function wp_remote_retrieve_headers(&$response) {}

Retrieve only the headers from the raw response.


  • array $response: HTTP response.
  • &$response

Return values

returns:The headers of the response. Empty array if incorrect parameter given.

Source code

function wp_remote_retrieve_headers(&$response) {

	if ( is_wp_error($response) || ! isset($response['headers']) || ! is_array($response['headers']))

		return array();

	return $response['headers'];



No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: