Interface Guzzle\Http\Message\MessageInterface

Implemented byGuzzle\Http\Message\AbstractMessage, Guzzle\Http\Message\EntityEnclosingRequest, Guzzle\Http\Message\Request, Guzzle\Http\Message\RequestInterface, Guzzle\Http\Message\Response

Request and response message interface

Public Methods

Hide inherited methods

MethodDescriptionDefined By
addHeader() Add a header to an existing collection of headers. Guzzle\Http\Message\MessageInterface
addHeaders() Add and merge in an array of HTTP headers. Guzzle\Http\Message\MessageInterface
getHeader() Retrieve an HTTP header by name. Performs a case-insensitive search of all headers. Guzzle\Http\Message\MessageInterface
getHeaderLines() Get an array of message header lines (e.g. ["Host: example.com", . Guzzle\Http\Message\MessageInterface
getHeaders() Get all headers as a collection Guzzle\Http\Message\MessageInterface
getParams() Get application and plugin specific parameters set on the message. Guzzle\Http\Message\MessageInterface
getRawHeaders() Get the raw message headers as a string Guzzle\Http\Message\MessageInterface
hasHeader() Check if the specified header is present. Guzzle\Http\Message\MessageInterface
removeHeader() Remove a specific HTTP header. Guzzle\Http\Message\MessageInterface
setHeader() Set an HTTP header and overwrite any existing value for the header Guzzle\Http\Message\MessageInterface
setHeaders() Overwrite all HTTP headers with the supplied array of headers Guzzle\Http\Message\MessageInterface

Method Details

addHeader() public abstract method

Add a header to an existing collection of headers.

public abstract self addHeader ( $header, $value )
$header string

Header name to add

$value string

Value of the header

addHeaders() public abstract method

Add and merge in an array of HTTP headers.

public abstract self addHeaders ( array $headers )
$headers array

Associative array of header data.

getHeader() public abstract method

Retrieve an HTTP header by name. Performs a case-insensitive search of all headers.

public abstract Guzzle\Http\Message\Header|null getHeader ( $header )
$header string

Header to retrieve.

getHeaderLines() public abstract method

Get an array of message header lines (e.g. ["Host: example.com", .

..])

public abstract array getHeaderLines ( )
getHeaders() public abstract method

Get all headers as a collection

public abstract Guzzle\Http\Message\Header\HeaderCollection getHeaders ( )
getParams() public abstract method

Get application and plugin specific parameters set on the message.

public abstract Guzzle\Common\Collection getParams ( )
getRawHeaders() public abstract method

Get the raw message headers as a string

public abstract string getRawHeaders ( )
hasHeader() public abstract method

Check if the specified header is present.

public abstract bool hasHeader ( $header )
$header string

The header to check.

removeHeader() public abstract method

Remove a specific HTTP header.

public abstract self removeHeader ( $header )
$header string

HTTP header to remove.

setHeader() public abstract method

Set an HTTP header and overwrite any existing value for the header

public abstract self setHeader ( $header, $value )
$header string

Name of the header to set.

$value mixed

Value to set.

setHeaders() public abstract method

Overwrite all HTTP headers with the supplied array of headers

public abstract self setHeaders ( array $headers )
$headers array

Associative array of header data.