updated-packages

This commit is contained in:
RafficMohammed
2023-01-08 00:13:22 +05:30
parent 3ff7df7487
commit da241bacb6
12659 changed files with 563377 additions and 510538 deletions

View File

@@ -26,14 +26,16 @@ use Psr\Http\Message\StreamInterface as Psr7StreamInterface;
class GuzzleHandler
{
private static $validOptions = [
'proxy' => true,
'verify' => true,
'timeout' => true,
'debug' => true,
'connect_timeout' => true,
'stream' => true,
'delay' => true,
'sink' => true,
'proxy' => true,
'expect' => true,
'cert' => true,
'verify' => true,
'timeout' => true,
'debug' => true,
'connect_timeout' => true,
'stream' => true,
'delay' => true,
'sink' => true,
];
/** @var ClientInterface */
@@ -49,9 +51,9 @@ class GuzzleHandler
/**
* @param Psr7Request $request
* @param array $options
*
* @return Promise\Promise
* @param array $options
* @return Promise\Promise|Promise\PromiseInterface
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function __invoke(Psr7Request $request, array $options = [])
{

View File

@@ -42,14 +42,17 @@ class GuzzleHandler
return $this->client->sendAsync($request, $this->parseOptions($options))
->otherwise(
static function (\Exception $e) {
static function ($e) {
$error = [
'exception' => $e,
'connection_error' => $e instanceof ConnectException,
'response' => null,
];
if ($e instanceof RequestException && $e->getResponse()) {
if (
($e instanceof RequestException)
&& $e->getResponse()
) {
$error['response'] = $e->getResponse();
}