Home > PHP > Function > > HttpRequest::getResponseHeader()

HttpRequest::getResponseHeader()

HttpRequest::getResponseHeader - Get response header(s)

Syntax

public HttpRequest::getResponseHeader (string $name)

Arguments

  • name - header to read; if empty, all response headers will be returned

Description

Get response header(s) after the request has been sent.

Version

PHP PECL pecl_http >= 0.10.0

Return value

Returns either a string with the value of the header matching name if requested, FALSE on failure, or an associative array containing all response headers.