WP_REST_Request::get_headers
Retrieves all headers from the request.
Method of the class: WP_REST_Request{}
No Hooks.
Returns
Array. Map of key to value. Key is always lowercase, as per HTTP specification.
Usage
$WP_REST_Request = new WP_REST_Request(); $WP_REST_Request->get_headers();
Changelog
| Since 4.4.0 | Introduced. |
WP_REST_Request::get_headers() WP REST Request::get headers code WP 7.0
public function get_headers() {
return $this->headers;
}