A WordPress-centric search engine for devs and theme authors



wp_remote_retrieve_headers ›

Since2.7.0
Deprecatedn/a
wp_remote_retrieve_headers ( $response )
Parameters:
  • (array) $response HTTP response.
    Required: Yes
See:
  • Requests_Utility_CaseInsensitiveDictionary
Returns:
  • (array|Requests_Utility_CaseInsensitiveDictionary) The headers of the response. Empty array if incorrect parameter given.
Defined at:
Codex:
Change Log:
  • 4.6.0

Retrieve only the headers from the raw response.



Source

function wp_remote_retrieve_headers( $response ) {
	if ( is_wp_error( $response ) || ! isset( $response['headers'] ) ) {
		return array();
	}

	return $response['headers'];
}