AsyncDecoratorTrait uses trait:short
Eases with processing responses while streaming them.
Tags
Table of Contents
Properties
Methods
- __construct() : mixed
- request() : AsyncResponse
- reset() : void
- stream() : ResponseStreamInterface
- withOptions() : static
Properties
$client
private
HttpClientInterface
$client
Methods
__construct()
public
__construct([HttpClientInterface|null $client = null ]) : mixed
Parameters
- $client : HttpClientInterface|null = null
request()
public
abstract request(string $method, string $url[, array<string|int, mixed> $options = [] ]) : AsyncResponse
Parameters
- $method : string
- $url : string
- $options : array<string|int, mixed> = []
Return values
AsyncResponsereset()
public
reset() : void
stream()
public
stream(ResponseInterface|iterable<string|int, mixed> $responses[, float|null $timeout = null ]) : ResponseStreamInterface
Parameters
- $responses : ResponseInterface|iterable<string|int, mixed>
- $timeout : float|null = null
Return values
ResponseStreamInterfacewithOptions()
public
withOptions(array<string|int, mixed> $options) : static
Parameters
- $options : array<string|int, mixed>