@@ -116,7 +116,7 @@ public function orderNodesByTimeoutMs($orderNodesByTimeoutMs)
116
116
$ answerRaw = $ this ->curlRequest (
117
117
$ currentNodeURL ,
118
118
'post ' ,
119
- json_encode ( $ requestData, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES ) ,
119
+ $ requestData ,
120
120
$ curlOptions
121
121
);
122
122
@@ -231,7 +231,7 @@ public function doRequest($apiName, array $data, $answerFormat = self::ANSWER_FO
231
231
$ answerRaw = $ this ->curlRequest (
232
232
$ this ->getCurrentUrl (),
233
233
'post ' ,
234
- json_encode ( $ requestData, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES ) ,
234
+ $ requestData ,
235
235
$ curlOptions
236
236
);
237
237
if ($ answerRaw ['code ' ] !== 200 ) {
@@ -280,7 +280,7 @@ public function curlRequest($url, $type = 'get', $data = [], $curlOptions = [])
280
280
281
281
if ($ type == 'post ' ) {
282
282
curl_setopt ($ ch , CURLOPT_POST , true );
283
- curl_setopt ($ ch , CURLOPT_POSTFIELDS , $ data );
283
+ curl_setopt ($ ch , CURLOPT_POSTFIELDS , json_encode ( $ data, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES ) );
284
284
} elseif ($ type == 'get ' && !empty ($ data )) {
285
285
$ temp = parse_url ($ url );
286
286
if (!empty ($ temp ['query ' ])) {
@@ -321,6 +321,9 @@ public function makeUrlFromArray($data)
321
321
if (!empty ($ data ['host ' ])) {
322
322
$ url .= $ data ['host ' ];
323
323
}
324
+ if (!empty ($ data ['port ' ])) {
325
+ $ url .= ': ' . $ data ['port ' ];
326
+ }
324
327
if (!empty ($ data ['path ' ])) {
325
328
$ url .= $ data ['path ' ];
326
329
}
0 commit comments