WP_HTTP_Response::set_headers() WordPress Method
The set_headers() method of the WP_HTTP_Response class sets the headers for the HTTP response. The headers are an associative array of header names and values. The header names are case-insensitive. This method can be called before or after the body of the response has been set.
WP_HTTP_Response::set_headers( array $headers ) #
Sets all header values.
Parameters
- $headers
(array)(Required)Map of header name to header value.
Source
File: wp-includes/class-wp-http-response.php
public function set_headers( $headers ) { $this->headers = $headers; }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
4.4.0 | Introduced. |