*/ trait AsyncDecoratorTrait { use DecoratorTrait; /** * @return AsyncResponse */ abstract public function request(string $method, string $url, array $options = []): ResponseInterface; public function stream(ResponseInterface|iterable $responses, ?float $timeout = null): ResponseStreamInterface { if ($responses instanceof AsyncResponse) { $responses = [$responses]; } return new ResponseStream(AsyncResponse::stream($responses, $timeout, static::class)); } }