File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -54,12 +54,12 @@ abstract class Request implements ArrayAccess
54
54
/**
55
55
* Request Connect Timeout
56
56
*/
57
- const CONNECT_TIMEOUT = 5 ;
57
+ public const CONNECT_TIMEOUT = 5 ;
58
58
59
59
/**
60
60
* Request Timeout
61
61
*/
62
- const TIMEOUT = 10 ;
62
+ public const TIMEOUT = 10 ;
63
63
64
64
/**
65
65
* @var string HTTP Method
@@ -317,9 +317,15 @@ public function resolveOption()
317
317
$ this ->resolveParameter ();
318
318
319
319
if (isset ($ this ->options ['form_params ' ])) {
320
- $ this ->options ['form_params ' ] = \GuzzleHttp \Psr7 \parse_query (
321
- Encode::create ($ this ->options ['form_params ' ])->toString ()
322
- );
320
+ if (function_exists ('\GuzzleHttp\Psr7\parse_query ' )) {
321
+ $ this ->options ['form_params ' ] = \GuzzleHttp \Psr7 \parse_query (
322
+ Encode::create ($ this ->options ['form_params ' ])->toString ()
323
+ );
324
+ } else {
325
+ $ this ->options ['form_params ' ] = \GuzzleHttp \Psr7 \Query::parse (
326
+ Encode::create ($ this ->options ['form_params ' ])->toString ()
327
+ );
328
+ }
323
329
}
324
330
325
331
$ this ->mergeOptionsIntoClient ();
You can’t perform that action at this time.
0 commit comments