18
This commit is contained in:
@@ -69,7 +69,10 @@ class Utils
|
||||
if ($token) {
|
||||
$options[RequestOptions::HEADERS]['token'] = $token;
|
||||
}
|
||||
|
||||
return post($uri,$data,[
|
||||
"token: {$token}",
|
||||
"operationID: {$options[RequestOptions::HEADERS]['operationID']}",
|
||||
]);
|
||||
return $client->post($uri, $options)->getBody()->getContents();
|
||||
}
|
||||
|
||||
@@ -88,10 +91,10 @@ class Utils
|
||||
$token = $token ? $token : Utils::getAdminToken();
|
||||
}
|
||||
$url = Url::buildUrl($path);
|
||||
//log_alert($url);
|
||||
//log_alert($data);
|
||||
//cp($url);
|
||||
//cp($data);
|
||||
$res = self::request($url, $data, $token);
|
||||
//log_alert($res);
|
||||
//cp($res);
|
||||
$res = json_decode($res, true);
|
||||
if($res['errCode'] !==0 ){
|
||||
throw new \Exception($res['errMsg'],$res['errCode']);
|
||||
|
||||
Reference in New Issue
Block a user