Open Monograph Press  3.3.0
GuzzleHttp\Handler\Proxy Class Reference

Static Public Member Functions

static wrapStreaming (callable $default, callable $streaming)
 
static wrapSync (callable $default, callable $sync)
 

Detailed Description

Provides basic proxies for handlers.

Definition at line 10 of file Proxy.php.

Member Function Documentation

◆ wrapStreaming()

static GuzzleHttp\Handler\Proxy::wrapStreaming ( callable  $default,
callable  $streaming 
)
static

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$defaultHandler used for non-streaming responses
callable$streamingHandler used for streaming responses
Returns
callable Returns the composed handler.

Definition at line 45 of file Proxy.php.

Referenced by GuzzleHttp\choose_handler().

◆ wrapSync()

static GuzzleHttp\Handler\Proxy::wrapSync ( callable  $default,
callable  $sync 
)
static

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

Parameters
callable$defaultHandler used for normal responses
callable$syncHandler used for synchronous responses.
Returns
callable Returns the composed handler.

Definition at line 21 of file Proxy.php.

References GuzzleHttp\RequestOptions\SYNCHRONOUS.

Referenced by GuzzleHttp\choose_handler().


The documentation for this class was generated from the following file: