update readme
This commit is contained in:
parent
b0ffeb7bad
commit
5fd6097604
|
@ -1,4 +1,9 @@
|
|||
# Paidian PHP RPC
|
||||
###框架基本信息
|
||||
|
||||
- 通信协议: HTTP
|
||||
- 通信框架: GuzzleHttp
|
||||
- 消息协议: JSON
|
||||
|
||||
|
||||
> 该项目使用 composer 来完成加载
|
||||
|
|
|
@ -124,6 +124,7 @@ class Client
|
|||
|
||||
try {
|
||||
$body = \GuzzleHttp\json_decode($resp->getBody(), true);
|
||||
app('log')->info('client call return body', $body);
|
||||
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'];
|
||||
throw new RpcServerException($message, $body['error']['code']);
|
||||
|
|
16
src/Providers/LoggerServiceProvider.php
Normal file
16
src/Providers/LoggerServiceProvider.php
Normal file
|
@ -0,0 +1,16 @@
|
|||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: dongwei
|
||||
* Date: 2019/1/18
|
||||
* Time: 1:36 PM
|
||||
*/
|
||||
|
||||
namespace JsonRpc\Providers;
|
||||
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
|
||||
class LoggerServiceProvider extends ServiceProvider
|
||||
{
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user