WireHttp::getResponseHeader() method

Get the last HTTP response headers (normal array).

Useful to examine for errors if your request returned false However, the WireHttp::getResponseHeaders() (plural) method may be better and this one is kept primarily for backwards compatibility.

Usage

// basic usage
$array = $http->getResponseHeader();

// usage with all arguments
$array = $http->getResponseHeader(string $key = '');

Arguments

NameType(s)Description
$key (optional)string

Optional header name you want to get

Return value

array string null


$http methods and properties

API reference based on ProcessWire core version 3.0.251