From 309389c98fb4c8a4322a6af3570ab035707a5448 Mon Sep 17 00:00:00 2001 From: Ege Date: Thu, 30 May 2024 03:58:25 +0300 Subject: [PATCH] Use array_merge instead of array addition So we can override options while initializing the client. --- src/Http/GuzzleHttpClient.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Http/GuzzleHttpClient.php b/src/Http/GuzzleHttpClient.php index f50578e..6c8be6f 100644 --- a/src/Http/GuzzleHttpClient.php +++ b/src/Http/GuzzleHttpClient.php @@ -134,7 +134,7 @@ private function request( ->request( $method->name, $uri, - [ + array_merge([ 'base_uri' => self::BASE_URI, 'http_errors' => false, 'headers' => [ @@ -144,7 +144,7 @@ private function request( ], 'query' => $query, 'json' => $body, - ] + $this->options, + ], $this->options), ); } catch (Throwable $exception) { throw new HttpException($exception->getMessage());