WireHttp::setCookie() method   
Set cookie(s) for http GET/POST/etc. request (currently used by curl option only)
Available since version 3.0.199.
Example
$http->setCookie('PHPSESSID', 'f3943z12339jz93j39iafai3f9393g');
$http->post('http://domain.com', [ 'foo' => 'bar' ], [ 'use' => 'curl' ]);Usage
$self = $http->setCookie(string $name, $value);Arguments
| Name | Type(s) | Description | 
|---|---|---|
| $name | string | Name of cookie to set | 
| $value | stringintnull | Specify value to set or null to remove | 
Return value
self
API reference based on ProcessWire core version 3.0.252