WP_REST_Request::get_headers() WordPress Method
The WP_REST_Request::get_headers() method is used to retrieve the headers for a request. Headers are an important part of a request, and can be used to determine the format of the data being sent, the type of data being sent, and other important information. This method can be used to retrieve the headers for a request, and can be used to determine the format of the data being sent, the type of data being sent, and other important information.
WP_REST_Request::get_headers() #
Retrieves all headers from the request.
Return
(array) Map of key to value. Key is always lowercase, as per HTTP specification.
Source
File: wp-includes/rest-api/class-wp-rest-request.php
public function get_headers() { return $this->headers; }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
4.4.0 | Introduced. |