Sets headers on the request.
Parameters
$headers
arrayrequired- Map of header name to value.
$override
booloptional- If true, replace the request’s headers. Otherwise, merge with existing.
Default:
true
Source
public function set_headers( $headers, $override = true ) {
if ( true === $override ) {
$this->headers = array();
}
foreach ( $headers as $key => $value ) {
$this->set_header( $key, $value );
}
}
Changelog
Version | Description |
---|---|
4.4.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.