PHP Interface Amp\Artax\AggregateBody

Show file Open project: amphp/artax Interface Usage Examples

Public Methods

Method Description
getBody ( ) : Amp\Promise Retrieve the HTTP message body to be sent
getHeaders ( ) : Amp\Promise Retrieve a key-value array of headers to add to the outbound request
getLength ( ) : Amp\Promise Retrieve the entity body's content length

Method Details

getBody() public method

The resolved promise value may be a string or an Iterator. An event reactor is always passed to assist with asynchronous value resolution.
public getBody ( ) : Amp\Promise
return Amp\Promise

getHeaders() public method

The resolved promise value must be a key-value array mapping header fields to values. An event reactor is always passed to assist with asynchronous value resolution.
public getHeaders ( ) : Amp\Promise
return Amp\Promise

getLength() public method

The resolved value must either be an integer length or null if the entity body's content length is not known.
public getLength ( ) : Amp\Promise
return Amp\Promise