Retrieves a single header by name from the raw response.
Parameters
$responsearray|WP_Error
HTTP response.
$headerstring
Header name to retrieve value from.
Return
array|string
The header(s) value(s). Array if multiple headers with the same name are retrieved. Empty string if incorrect parameter given, or if the header doesn't exist.
Uses · 1
is_wp_error()Checks whether the given variable is a WordPress Error.
Signature, return type and hooks compared across 5 parsed releases.
About this page
Parsed data
Generated from the wordpress-develop 7.0.4 tag, from src/wp-includes/http.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.