Set an array of request headers to send with GET/POST/etc. request
Merges with existing headers unless you specify true for the $reset option (since 3.0.131). If you specify null for any header value, it removes the header (since 3.0.131).
Usage
// basic usage
$http->setHeaders(array $headers);
// usage with all arguments
$http->setHeaders(array $headers, array $options = []);
Arguments
Name | Type(s) | Description |
---|---|---|
headers | array | Associative array of headers to set |
options (optional) | array | Options to modify default behavior (since 3.0.131):
|
Return value
$this
Object instance it was called from (method supports fluent interface).
API reference based on ProcessWire core version 3.0.236