update readme

This commit is contained in:
dongwei 2019-01-18 14:25:50 +08:00
parent b0ffeb7bad
commit 5fd6097604
3 changed files with 22 additions and 0 deletions

View File

@ -1,4 +1,9 @@
# Paidian PHP RPC
###框架基本信息
- 通信协议: HTTP
- 通信框架: GuzzleHttp
- 消息协议: JSON
> 该项目使用 composer 来完成加载

View File

@ -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']);

View 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
{
}