\GuzzleHttp\HandlerProxy

Provides basic proxies for handlers.

Summary

Methods
Properties
Constants
wrapSync()
wrapStreaming()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

wrapSync()

wrapSync(callable  $default, callable  $sync) : \GuzzleHttp\Handler\callable(\Psr\Http\Message\RequestInterface,

Sends synchronous requests to a specific handler while sending all other requests to another handler.

Parameters

callable $default
callable $sync

Returns

\GuzzleHttp\Handler\callable(\Psr\Http\Message\RequestInterface, —

array): \GuzzleHttp\Promise\PromiseInterface Returns the composed handler.

wrapStreaming()

wrapStreaming(callable  $default, callable  $streaming) : \GuzzleHttp\Handler\callable(\Psr\Http\Message\RequestInterface,

Sends streaming requests to a streaming compatible handler while sending all other requests to a default handler.

This, for example, could be useful for taking advantage of the performance benefits of curl while still supporting true streaming through the StreamHandler.

Parameters

callable $default
callable $streaming

Returns

\GuzzleHttp\Handler\callable(\Psr\Http\Message\RequestInterface, —

array): \GuzzleHttp\Promise\PromiseInterface Returns the composed handler.