-
Notifications
You must be signed in to change notification settings - Fork 1
Message: getHeaderLine Example
Terry L edited this page Jun 20, 2020
·
3 revisions
Shieldon\Psr7\Message
Retrieves a comma-separated string of the values for a single header.
-
param
string
name*
Case-insensitive header field name. -
return
array
a string values as provided for the given header concatenated together using a comma. Return empty string if the header dosn't exist.
Example:
echo $this->message->getHeaderLine('user-agent');
// Outputs: Mozilla/5.0 (Windows NT 10.0; Win64; x64)
composer require shieldon/psr-http
Shieldon PSR HTTP implementation written by Terry L. from Taiwan.