Trait implementing functionality common to requests and responses.

public getBody()
public getHeader( $header)
public getHeaderLine( $header)
public getHeaders()
public getProtocolVersion()
public hasHeader( $header)
public withAddedHeader( $header, $value)
public withBody(Psr\Http\Message\StreamInterface $body)
public withHeader( $header, $value)
public withoutHeader( $header)
public withProtocolVersion( $version)
private $headerNames
  • var array Map of lowercase header name => original name at registration
private $headers
  • var array Map of all registered headers, as original name => array of values
private $protocol
  • var string
private $stream
  • var StreamInterface
private assertHeader( $header)
private normalizeHeaderValue( $value)
private setHeaders(array $headers)
private trimHeaderValues(array $values)

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 )

  • return string[] Trimmed header values
  • see
© 2020 Bruce Wells
Search Namespaces \ Classes
ConfigurationNumbers (0-9.) only