Skip to content

Commit

Permalink
Request
Browse files Browse the repository at this point in the history
  • Loading branch information
zhouaini528 committed Apr 25, 2019
1 parent 2a5ded8 commit 36c33f7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,12 @@ protected function exec(){
//可以记录日志
try {
$temp=json_decode($this->send(),true);
if(isset($temp['status']) && $temp['status']=='error') throw new Exception(json_encode($temp));
if(isset($temp['status']) && $temp['status']=='error') {
$temp['_method']=$this->type;
$temp['_url']=$this->host.$this->path;
$temp['_httpcode']=200;
throw new Exception(json_encode($temp));
}

return $temp;
}catch (RequestException $e){
Expand Down

0 comments on commit 36c33f7

Please sign in to comment.