\GuzzleHttp\HandlerCurlFactory

Creates curl resources from a request

Summary

Methods
Properties
Constants
__construct()
create()
release()
finish()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
invokeStats()
finishError()
createRejection()
getDefaultConf()
applyMethod()
applyBody()
applyHeaders()
removeHeader()
applyHandlerOptions()
retryFailedRewind()
createHeaderFn()
$handles
$maxHandles
N/A

Properties

$handles

$handles : array

Type

array

$maxHandles

$maxHandles : integer

Type

integer — Total number of idle handles to keep in cache

Methods

__construct()

__construct(integer  $maxHandles) 

Parameters

integer $maxHandles

Maximum number of idle handles.

release()

release(\GuzzleHttp\Handler\EasyHandle  $easy) 

Release an easy handle, allowing it to be reused or closed.

This function must call unset on the easy handle's "handle" property.

Parameters

\GuzzleHttp\Handler\EasyHandle $easy

applyBody()

applyBody(\Psr\Http\Message\RequestInterface  $request, array  $options, array  $conf) 

Parameters

\Psr\Http\Message\RequestInterface $request
array $options
array $conf

removeHeader()

removeHeader(string  $name, array  $options) 

Remove a header from the options array.

Parameters

string $name

Case-insensitive header to remove

array $options

Array of options to modify

applyHandlerOptions()

applyHandlerOptions(\GuzzleHttp\Handler\EasyHandle  $easy, array  $conf) 

Parameters

\GuzzleHttp\Handler\EasyHandle $easy
array $conf

retryFailedRewind()

retryFailedRewind(callable  $handler, \GuzzleHttp\Handler\EasyHandle  $easy, array  $ctx) 

This function ensures that a response was set on a transaction. If one was not set, then the request is retried if possible. This error typically means you are sending a payload, curl encountered a "Connection died, retrying a fresh connect" error, tried to rewind the stream, and then encountered a "necessary data rewind wasn't possible" error, causing the request to be sent through curl_multi_info_read() without an error status.

Parameters

callable $handler
\GuzzleHttp\Handler\EasyHandle $easy
array $ctx