设置HTTP
响应的cookie
信息。此方法参数与PHP
的setcookie
完全一致。
swoole_http_response->cookie(string $key, string $value = '', int $expire = 0 , string $path = '/', string $domain = '', bool $secure = false , bool $httponly = false);
cookie设置必须在end方法之前
$value
进行urlencode
编码,可使用rawCookie
关闭对$value
的编码处理$key
的COOKIE