GuzzleHttpClient
- class Firstred\PostNL\HttpClient\GuzzleHttpClient
- Class GuzzleClient.
Summary
Methods
Constants
- DEFAULT_TIMEOUT = 60
- DEFAULT_CONNECT_TIMEOUT = 20
Properties
- protected static property Firstred\PostNL\HttpClient\GuzzleHttpClient::$defaultOptions
- Type:
array
- private static property Firstred\PostNL\HttpClient\GuzzleHttpClient::$client
Methods
- public Firstred\PostNL\HttpClient\GuzzleHttpClient::__construct($client=null, $logger=null, $concurrency=5, $maxRetries=5)
- GuzzleClient constructor.
- Since:
1.3.0 Custom constructor
- private Firstred\PostNL\HttpClient\GuzzleHttpClient::setClient($client)
- private Firstred\PostNL\HttpClient\GuzzleHttpClient::getClient()
- Get the Guzzle client.
- Returns:
\GuzzleHttp\Client
- public Firstred\PostNL\HttpClient\GuzzleHttpClient::setOption($name, $value)
- Set Guzzle option.
- Parameters:
$name (string)
$value (mixed)
- Returns:
- public Firstred\PostNL\HttpClient\GuzzleHttpClient::getOption($name)
- Get Guzzle option.
- Parameters:
$name (string)
- Returns:
mixed | null
- public Firstred\PostNL\HttpClient\GuzzleHttpClient::doRequest($request)
- Do a single request.Exceptions are captured into the result array
- public Firstred\PostNL\HttpClient\GuzzleHttpClient::doRequests( $requests=\[\])
- Do all async requests.Exceptions are captured into the result array
- Parameters:
$requests (
Psr\Http\Message\RequestInterface[])
- Returns:
\Firstred\PostNL\Exception\HttpClientException[]|\Psr\Http\Message\ResponseInterface[]- Throws: