调试工具

This commit is contained in:
候学杰 2019-01-30 17:39:25 +08:00
parent e198efa7ce
commit 50c3fb8e26
3 changed files with 11 additions and 5 deletions

View File

@ -118,7 +118,8 @@ class Client extends JsonRpc
} }
if (isset($body['error']) && isset($body['error']['code']) && isset($body['error']['message'])) { if (isset($body['error']) && isset($body['error']['code']) && isset($body['error']['message'])) {
$message = is_array($body['error']['message']) ? json_encode($body['error']['message']) : $body['error']['message']; $message = is_array($body['error']['message']) ? json_encode($body['error']['message']) : $body['error']['message'];
throw new RpcServerException($message, $body['error']['code']); $e = new RpcServerException($message, $body['error']['code']);
throw $e;
} }
return $body['result']; return $body['result'];

View File

@ -20,7 +20,9 @@ class BaseServiceProvider extends ServiceProvider
//local //local
'127.0.0.1', '127.0.0.1',
//北京办公区 //北京办公区
'172.16.100.0/16' '172.16.100.0/16',
//aliyun slb
'100.116.71.0/16',
], Request::HEADER_X_FORWARDED_ALL); ], Request::HEADER_X_FORWARDED_ALL);
} }

View File

@ -81,10 +81,13 @@
code&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;: {{$error['code']}} <br> code&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;: {{$error['code']}} <br>
message : {{$error['message']}} message : {{$error['message']}}
</div> </div>
@if($error['resp'])
<h5>返回内容:</h5> <h5>返回内容:</h5>
<iframe style="width: 100%;height: 500px;border: none;" srcdoc='{{$error['resp']->getBody()}}'></iframe> <iframe style="width: 100%;height: 500px;border: none;"
srcdoc='{{$error['resp']->getBody()}}'></iframe>
<hr> <hr>
@endif @endif
@endif
@if( !empty($result) ) @if( !empty($result) )
<h5>Result:</h5> <h5>Result:</h5>