File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -53,12 +53,9 @@ public function prepareSend(): CurlRequest
5353 $ ch = $ this ->getCh ();
5454 $ method = $ this ->getMethod ();
5555 $ uri = $ this ->getUri ();
56-
56+
5757 // добавляем данные запроса
58- if ('GET ' === $ method ) {
59- $ body = $ this ->getQuery ();
60- $ uri .= static ::prepareDataToUriQuery ($ body );
61- } else {
58+ if ('GET ' !== $ method ) {
6259 $ type = $ this ->getHeader ('Content-Type ' );
6360 if (false !== strpos ($ type , 'application/json ' )) {
6461 $ this ->withBodyJson ($ this ->getBody ());
@@ -80,7 +77,9 @@ public function prepareSend(): CurlRequest
8077 $ this ->withHeader ('Cookie ' , implode ('; ' , $ cookies ));
8178 }
8279 $ headers = $ this ->getHeadersLines ();
80+
8381 // устанавливаем url и заголовки
82+ $ uri .= static ::prepareDataToUriQuery ($ this ->getQuery ());
8483 curl_setopt ($ ch , CURLOPT_URL , $ uri );
8584 curl_setopt ($ ch , CURLOPT_HTTPHEADER , $ headers );
8685 curl_setopt ($ ch , CURLOPT_SSL_VERIFYPEER , false );
You can’t perform that action at this time.
0 commit comments