WP_HTTP_Response::get_headers() WordPress Method

The WP_HTTP_Response::get_headers() function returns an array of headers for the current HTTP response. This can be useful for debugging or for making sure that the correct headers are being sent to the client.

WP_HTTP_Response::get_headers() #

Retrieves headers associated with the response.


Return

(array) Map of header name to header value.


Top ↑

Source

File: wp-includes/class-wp-http-response.php

	public function get_headers() {
		return $this->headers;
	}

Top ↑

Changelog

Changelog
VersionDescription
4.4.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.