Skip to content
laylatichy\nano\core\headers\Headers ​

useHeaders() is a helper function to get the headers instance

useHeaders
():
Headers
​

php
useHeaders();

get
():
?string
​

php
useHeaders()->get('Content-Type');

getAll
():
<string, string>[]
​

php
useHeaders()->getAll();

add
(
string $header, 
string $value
):
Headers
​

php
useHeaders()->add('Content-Type', 'application/json');