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 | string, int, null | Specify value to set or null to remove |
Return value
self
API reference based on ProcessWire core version 3.0.236