File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed
src/support/forge/api/Traits/Client Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -19,23 +19,24 @@ protected function getStacks($config)
1919
2020 $ stack = $ config ['client ' ]['handler ' ] ?? HandlerStack::create ();
2121
22+ if (method_exists ($ this , 'requestHandler ' )) {
23+ $ function = [$ this , 'requestHandler ' ];
24+ $ stack ->push ($ this ->getRequestStack ($ function ));
25+ }
2226 if (!empty ($ config ['settings ' ]['requestHandler ' ])) {
2327 $ request = $ this ->getRequestStack ($ config ['settings ' ]['requestHandler ' ]);
2428 $ stack ->push ($ request );
2529 }
26- if (method_exists ($ this , 'requestHandler ' )) {
27- $ function = [$ this , 'requestHandler ' ];
28- $ stack ->push ($ this ->getRequestStack ($ function ));
30+
31+ if (method_exists ($ this , 'responseHandler ' )) {
32+ $ function = [$ this , 'responseHandler ' ];
33+ $ stack ->push ($ this ->getResponseStack ($ function ));
2934 }
3035
3136 if (!empty ($ config ['settings ' ]['responseHandler ' ])) {
3237 $ response = $ this ->getResponseStack ($ config ['settings ' ]['responseHandler ' ]);
3338 $ stack ->push ($ response );
3439 }
35- if (method_exists ($ this , 'responseHandler ' )) {
36- $ function = [$ this , 'responseHandler ' ];
37- $ stack ->push ($ this ->getResponseStack ($ function ));
38- }
3940
4041 if ($ config ['log ' ] ?? true !== false ) {
4142 $ logger = $ this ->getLoggerStack ($ config ['log ' ] ?? null );
You can’t perform that action at this time.
0 commit comments