Solar_Http_Request_Adapter_Stream::setHeader()
public
Solar_Http_Request_Adapter
Solar_Http_Request_Adapter_Stream::setHeader
( string $key
, string $val
, bool $replace = true
)
Sets a header value in $this->_headers for sending at fetch() time.
Inherited from Solar_Http_Request_Adapter.
Parameters
(string)
$key
: The header label, such as "X-Foo-Bar".(string)
$val
: The value for the header. When null or false, deletes the header.(bool)
$replace
: This header value should replace any previous values of the same key. When false, the same header key is sent multiple times with the different values.
Returns
(Solar_Http_Request_Adapter) This adapter object.
Description
Sets a header value in $this->_headers for sending at fetch() time.
This method will not set cookie values; use setCookie() or setCookies() instead.