Skip to content

Commit 086788a

Browse files
committed
🚿
1 parent 451da54 commit 086788a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/CurlClient.php

+4-3
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,10 @@ protected function getResponse():HTTPResponseInterface{
8383
'Connection: close',
8484
];
8585

86-
$url = $this->requestURL.(!empty($this->requestParams) ? '?'.$this->buildQuery($this->requestParams) : '');
86+
parse_str($this->parsedURL['query'] ?? '', $parsedquery);
87+
$params = array_merge($parsedquery, $this->requestParams);
88+
89+
$url = $this->requestURL.(!empty($params) ? '?'.http_build_query($params) : '');
8790

8891
$options += [
8992
CURLOPT_URL => $url,
@@ -96,8 +99,6 @@ protected function getResponse():HTTPResponseInterface{
9699
$response = curl_exec($this->http);
97100
$curl_info = curl_getinfo($this->http);
98101

99-
curl_close($this->http);
100-
101102
return new HTTPResponse([
102103
'url' => $url,
103104
'curl_info' => $curl_info,

0 commit comments

Comments
 (0)