File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ public function __construct(
3939 ) {
4040 }
4141
42- public function newClient (): IClient {
42+ public function newClient (array $ baseConfig = [] ): IClient {
4343 $ handler = new CurlHandler ();
4444 $ stack = HandlerStack::create ($ handler );
4545 if ($ this ->config ->getSystemValueBool ('dns_pinning ' , true )) {
@@ -51,7 +51,8 @@ public function newClient(): IClient {
5151 $ this ->eventLogger ->end ('http:request ' );
5252 }), 'event logger ' );
5353
54- $ client = new GuzzleClient (['handler ' => $ stack ]);
54+ $ config = array_merge ($ baseConfig , ['handler ' => $ stack ]);
55+ $ client = new GuzzleClient ($ config );
5556
5657 return new Client (
5758 $ this ->config ,
Original file line number Diff line number Diff line change 1414 * @since 8.1.0
1515 */
1616interface IClientService {
17- /**
18- * @param array $baseConfig default configuration for the client
17+
18+ /**
19+ * @param array $baseConfig default configuration for the client
1920 * @return IClient
2021 * @since 8.1.0
2122 */
You can’t perform that action at this time.
0 commit comments