@@ -25,10 +25,11 @@ class GuzzleHttpClient implements HttpClientInterface
2525 * @param array<string, mixed> $customHeaders
2626 */
2727 public function __construct (
28- private readonly array $ customHeaders = [],
29- private readonly float $ timeout = 60.0 ,
30- private readonly float $ connectTimeout = 10.0 ,
31- private readonly ?HandlerStack $ handler = null ,
28+ protected readonly array $ customHeaders = [],
29+ protected readonly float $ timeout = 60.0 ,
30+ protected readonly float $ connectTimeout = 10.0 ,
31+ protected readonly ?HandlerStack $ handler = null ,
32+ protected readonly array $ options = [],
3233 ) {
3334 }
3435
@@ -38,6 +39,7 @@ public function request(HttpRequest $request): HttpResponse
3839
3940 try {
4041 $ options = [
42+ ...$ this ->options ,
4143 RequestOptions::HEADERS => [...$ this ->customHeaders , ...$ request ->headers ],
4244 RequestOptions::TIMEOUT => $ this ->timeout ,
4345 RequestOptions::CONNECT_TIMEOUT => $ this ->connectTimeout ,
@@ -177,7 +179,6 @@ protected function buildMultipartData(array $data): array
177179 }
178180
179181 /**
180- * @param HttpRequest $request
181182 * @param array<string, mixed> $options
182183 * @throws GuzzleException
183184 */
0 commit comments