File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ public function request(Request $request, $timeout = 30)
5050 'ssl_verify_peer ' => empty ($ this ->config ['skipVerifyTls ' ]),
5151 ];
5252 $ client = static ::getClient ($ config );
53- $ options ['headers ' ] = $ request ->getHeaders () + [ ' Content-Type ' => ContentType:: JSON ] ;
53+ $ options ['headers ' ] = $ request ->getHeaders ();
5454
5555 $ method = $ request ->getMethod ();
5656 $ requestUri = $ request ->getRequestUri ();
@@ -64,6 +64,7 @@ public function request(Request $request, $timeout = 30)
6464 case Request::METHOD_PUT :
6565 case Request::METHOD_POST :
6666 $ data = $ request ->getBodyParams ();
67+ $ options ['headers ' ]['Content-Type ' ] = ContentType::JSON ;
6768 /**@var \Swlib\Saber\Response $saberResponse */
6869 $ saberResponse = $ client ->{strtolower ($ method )}($ requestUri , $ data , $ options );
6970 break ;
@@ -87,4 +88,4 @@ public function request(Request $request, $timeout = 30)
8788 throw $ exception ;
8889 }
8990 }
90- }
91+ }
You can’t perform that action at this time.
0 commit comments