Amp\Artax\Client interface Client

Interface definition for an HTTP client.

Summary

Properties

Methods

Methods

request — public function request(Amp\Artax\Request|string $uriOrRequest, array $options = [], Amp\Artax\CancellationToken $cancellation = null): Amp\Artax\Promise

Asynchronously request an HTTP resource.

Type Parameter Description Default Value
Amp\Artax\Request|string $uriOrRequest An HTTP URI string or a Request instance. none
array $options An array specifying options applicable only for this request. []
Amp\Artax\CancellationToken $cancellation A cancellation token to optionally cancel requests. null