File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -66,11 +66,7 @@ public function getFactoryCollection(): FactoryCollection
6666 */
6767 protected function createGuzzleClient (): GuzzleClient
6868 {
69- // We'll use HandlerStack::create as it will create a default
70- // handler stack with the default Guzzle middleware like
71- // http_errors, cookies etc.
72-
73- $ this ->handlerStack = HandlerStack::create ();
69+ $ this ->handlerStack = $ this ->defaultHandlerStack ();
7470
7571 // Now we'll return new Guzzle client with some default request
7672 // options configured. We'll also define the handler stack we
@@ -86,6 +82,18 @@ protected function createGuzzleClient(): GuzzleClient
8682 ]);
8783 }
8884
85+ /**
86+ * The default handler stack used by the underlying Guzzle client
87+ */
88+ protected function defaultHandlerStack (): HandlerStack
89+ {
90+ // We'll use HandlerStack::create as it will create a default
91+ // handler stack with the default Guzzle middleware like
92+ // http_errors, cookies etc.
93+
94+ return HandlerStack::create ();
95+ }
96+
8997 /**
9098 * Send a synchronous request.
9199 *
You can’t perform that action at this time.
0 commit comments