Method
CurlResponse::getHeaderLine
Return the values of a header joined by ", ", or an empty string; the name is case-insensitive.
Description#
public CurlResponse::getHeaderLine(
string $name
): stringWaits for the headers. With redirects followed, these are the headers of the last response.
Parameters#
- $name string
Return values#
string
Examples#
echo $client->get('https://example.com/')->getHeaderLine('content-type');See also#
CurlResponse::getHeaderRetrieves a message header value by the given case-insensitive name.