Amp\Artax\FileBody class FileBody implements Amp\Artax\RequestBody






__construct — public function __construct(Amp\Promise $promise)
No documentation.
Type Parameter Description Default Value
Amp\Promise $promise No documentation. none
createBodyStream — public function createBodyStream(): Amp\ByteStream\InputStream

Create the HTTP message body to be sent.

Further calls MUST return a new stream to make it possible to resend bodies on redirects.

read — public function read(): Amp\Promise
No documentation.
getHeaders — public function getHeaders(): Amp\Promise

Retrieve a key-value array of headers to add to the outbound request.

The resolved promise value must be a key-value array mapping header fields to values.

getBodyLength — public function getBodyLength(): Amp\Promise

Retrieve the HTTP message body length. If not available, return -1.