\GuzzleHttp\Psr7MessageTrait

Trait implementing functionality common to requests and responses.

Summary

Methods
Properties
Constants
getProtocolVersion()
withProtocolVersion()
getHeaders()
hasHeader()
getHeader()
getHeaderLine()
withHeader()
withAddedHeader()
withoutHeader()
getBody()
withBody()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
setHeaders()
normalizeHeaderValue()
trimHeaderValues()
assertHeader()
$headers
$headerNames
$protocol
$stream
N/A

Properties

$headers

$headers : array

Type

array — Map of all registered headers, as original name => array of values

$headerNames

$headerNames : array

Type

array — Map of lowercase header name => original name at registration

$protocol

$protocol : string

Type

string

Methods

getProtocolVersion()

getProtocolVersion() 

withProtocolVersion()

withProtocolVersion(  $version) 

Parameters

$version

getHeaders()

getHeaders() 

hasHeader()

hasHeader(  $header) 

Parameters

$header

getHeader()

getHeader(  $header) 

Parameters

$header

getHeaderLine()

getHeaderLine(  $header) 

Parameters

$header

withHeader()

withHeader(  $header,   $value) 

Parameters

$header
$value

withAddedHeader()

withAddedHeader(  $header,   $value) 

Parameters

$header
$value

withoutHeader()

withoutHeader(  $header) 

Parameters

$header

getBody()

getBody() 

setHeaders()

setHeaders(array  $headers) 

Parameters

array $headers

normalizeHeaderValue()

normalizeHeaderValue(  $value) 

Parameters

$value

trimHeaderValues()

trimHeaderValues(array<mixed,string>  $values) : array<mixed,string>

Trims whitespace from the header values.

Spaces and tabs ought to be excluded by parsers when extracting the field value from a header field.

header-field = field-name ":" OWS field-value OWS OWS = *( SP / HTAB )

Parameters

array<mixed,string> $values

Header values

Returns

array<mixed,string> —

Trimmed header values

assertHeader()

assertHeader(  $header) 

Parameters

$header