Copied!

Creates curl resources from a request

  • final
Cloneable Instantiable
Constants
public GuzzleHttp\Handler\CurlFactory ::CURL_VERSION_STR = 'curl_version'
public GuzzleHttp\Handler\CurlFactory ::LOW_CURL_VERSION_NUMBER = '7.21.2'
 
  • deprecated
Methods
public __construct ( int $maxHandles )
 
public create ( Psr\Http\Message\RequestInterface $request , array $options ) : GuzzleHttp\Handler\EasyHandle
public static finish ( callable $handler , GuzzleHttp\Handler\EasyHandle $easy , GuzzleHttp\Handler\CurlFactoryInterface $factory ) : GuzzleHttp\Promise\PromiseInterface
 

Completes a cURL transaction, either returning a response promise or a
rejected promise.

public release ( GuzzleHttp\Handler\EasyHandle $easy ) : void
Properties
private $handles
 
  • var resource []| CurlHandle []
private $maxHandles
 
  • var int Total number of idle handles to keep in cache
Methods
private applyBody ( Psr\Http\Message\RequestInterface $request , array $options , array $conf ) : void
private applyHandlerOptions ( GuzzleHttp\Handler\EasyHandle $easy , array $conf ) : void
private applyHeaders ( GuzzleHttp\Handler\EasyHandle $easy , array $conf ) : void
private applyMethod ( GuzzleHttp\Handler\EasyHandle $easy , array $conf ) : void
private createHeaderFn ( GuzzleHttp\Handler\EasyHandle $easy ) : callable
private static createRejection ( GuzzleHttp\Handler\EasyHandle $easy , array $ctx ) : GuzzleHttp\Promise\PromiseInterface
private static finishError ( callable $handler , GuzzleHttp\Handler\EasyHandle $easy , GuzzleHttp\Handler\CurlFactoryInterface $factory ) : GuzzleHttp\Promise\PromiseInterface
 
private getDefaultConf ( GuzzleHttp\Handler\EasyHandle $easy ) : array
 
  • return array | string,mixed>
private static invokeStats ( GuzzleHttp\Handler\EasyHandle $easy ) : void
private removeHeader ( string $name , array $options ) : void
 

Remove a header from the options array.

private static retryFailedRewind ( callable $handler , GuzzleHttp\Handler\EasyHandle $easy , array $ctx ) : GuzzleHttp\Promise\PromiseInterface
 

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.

Methods
private static createRejection ( GuzzleHttp\Handler\EasyHandle $easy , array $ctx ) : GuzzleHttp\Promise\PromiseInterface
public static finish ( callable $handler , GuzzleHttp\Handler\EasyHandle $easy , GuzzleHttp\Handler\CurlFactoryInterface $factory ) : GuzzleHttp\Promise\PromiseInterface
 

Completes a cURL transaction, either returning a response promise or a
rejected promise.

private static finishError ( callable $handler , GuzzleHttp\Handler\EasyHandle $easy , GuzzleHttp\Handler\CurlFactoryInterface $factory ) : GuzzleHttp\Promise\PromiseInterface
 
private static invokeStats ( GuzzleHttp\Handler\EasyHandle $easy ) : void
private static retryFailedRewind ( callable $handler , GuzzleHttp\Handler\EasyHandle $easy , array $ctx ) : GuzzleHttp\Promise\PromiseInterface
 

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.

© 2021 Bruce Wells
Search Namespaces \ Classes
Configuration