WP_HTTP_Requests_Response::set_headers()
Sets all header values.
Method of the class: WP_HTTP_Requests_Response{}
No Hooks.
Return
null
. Nothing (null).
Usage
$WP_HTTP_Requests_Response = new WP_HTTP_Requests_Response(); $WP_HTTP_Requests_Response->set_headers( $headers );
- $headers(array) (required)
- Map of header name to header value.
Changelog
Since 4.6.0 | Introduced. |
WP_HTTP_Requests_Response::set_headers() WP HTTP Requests Response::set headers code WP 6.4.3
public function set_headers( $headers ) { $this->response->headers = new WpOrg\Requests\Response\Headers( $headers ); }