PHP Class Amp\Artax\FileBody

Inheritance: implements Amp\Artax\AggregateBody
Show file Open project: amphp/artax

Public Methods

Method Description
__construct ( string $path )
getBody ( ) : Amp\Promise Retrieve the sendable Amp\Artax entity body representation
getHeaders ( ) : Amp\Promise Return a key-value array of headers to add to the outbound request
getLength ( ) : Amp\Promise Retrieve the entity body's content length

Method Details

__construct() public method

public __construct ( string $path )
$path string The filesystem path for the file we wish to send

getBody() public method

Retrieve the sendable Amp\Artax entity body representation
public getBody ( ) : Amp\Promise
return Amp\Promise

getHeaders() public method

Return a key-value array of headers to add to the outbound request
public getHeaders ( ) : Amp\Promise
return Amp\Promise

getLength() public method

Retrieve the entity body's content length
public getLength ( ) : Amp\Promise
return Amp\Promise