See http\Message for inherited members.
+## Changelog:
+
+Version | Changes
+--------|--------
+2.2.0 | Added http\Env\Request::getCookie() and http\Env\Request::$cookie.
+
## Constants:
None.
The request's form parameters. ($_POST)
* protected array $files = NULL
The request's form uploads. ($_FILES)
+* protected array $cookie = NULL
+ The request's cookies. ($_COOKIE)
--- /dev/null
+# mixed http\Env\Request::getCookie([string $name = NULL[, mixed $type = NULL[, mixed $defval = NULL[, bool $delete = false]]]])
+
+Retrieve an URL query value ($_GET).
+
+See http\QueryString::get() and http\QueryString::TYPE_* constants.
+
+## Params:
+
+* Optional string $name = NULL
+ The key to retrieve the value for.
+* Optional mixed $type = NULL
+ The type to cast the value to. See http\QueryString::TYPE_* constants.
+* Optional mixed $defval = NULL
+ The default value to return if the key $name does not exist.
+* Optional bool $delete = false
+ Whether to delete the entry from the querystring after retrieval.
+
+
+## Returns:
+
+* http\QueryString, if called without arguments.
+* string, the whole querystring if $name is of zero length.
+* mixed, $defval if the key $name does not exist.
+* mixed, the querystring value cast to $type if $type was specified and the key $name exists.
+* string, the querystring value if the key $name exists and $type is not specified or equals http\QueryString::TYPE_STRING.
See http\Message for inherited members.
+## Changelog:
+
+Version | Changes
+--------|--------
+2.2.0 | Added http\Env\Response::setCookie() and http\Env\Response::$cookies.
+
## Constants:
* CONTENT_ENCODING_NONE
Any throttling delay.
* protected int $throttleChunk = NULL
The chunk to send every $throttleDelay seconds.
+* protected array $cookies = NULL
+ The response's cookies.
--- /dev/null
+# http\Env\Response http\Env\Response::setCookie(mixed $cookie)
+
+Add cookies to the response to send.
+
+## Params:
+
+* mixed $cookie
+ The cookie to send.
+
+## Returns:
+
+* http\Env\Response, self.
+
+## Throws:
+
+* http\Exception\InvalidArgumentException
+* http\Exception\UnexpectedValueException
+
+## Example:
+
+ <?php
+
+ $r = new http\Env\Response;
+ $r->setCookie("visit=true; path=/");
+ $r->send(STDOUT);
+
+ ?>
+
+Yields:
+
+ HTTP/1.1 200 OK
+ Set-Cookie: visit=true; path=/;
+ ETag: ""
+
+### Another example:
+
+ <?php
+
+ $c = new http\Cookie;
+ $c->addCookie("foo", "bar");
+ $c->setMaxAge(360);
+ $c->setDomain(".example.org");
+ $c->setPath("/");
+ $c->setFlags(http\Cookie::SECURE | http\Cookie::HTTPONLY);
+
+ $r = new http\Env\Response;
+ $r->setCookie($c);
+ $r->send(STDOUT);
+
+ ?>
+
+Yields:
+
+ HTTP/1.1 200 OK
+ Set-Cookie: foo=bar; domain=.example.org; path=/; max-age=360; secure; httpOnly;
+ ETag: ""