WPDev.one
Core Function
View Source on Trac ↗

wp_remote_retrieve_header()

wp_remote_retrieve_header( mixed $response, mixed $header )

Retrieves a single header by name from the raw response.

Parameters 2 required

Name / Type Description
(array

| WP_Error) $response HTTP response.

Required
$header
string

Header name to retrieve value from.

Required

Return Value

((array)
(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.

Function Information

Since Version
2.7.0
Source File
wp-includes/http.php
Advertisement