Request & Response
Response are similar objects that contains informations about the HTTP request/response. They are aliases for lighttp's
They both contain headers, which can be read (case-insensitive) by treating the property
headers as an associative array, and a body, which is a simple string.
It is possible to get the path of the request using the
url.path property and the query parameters using the
Cookies are lazily initialized by calling the property
cookies, that returns an associative array.
Cookies are added by calling the
add function and passing an instance of
Cookie as the first parameter. It is possible to add multiple cookies.