Update Client.php

This commit is contained in:
候学杰 2019-04-23 15:17:14 +08:00
parent 9cbfd4850e
commit ac3f7bb737

View File

@ -92,13 +92,14 @@ class Client extends JsonRpc
*/
protected function post($payload, $options = [])
{
$uri = 'rpc/json-rpc-v2.json?app='.$this->config['app'];
try {
$headers = [
'X-Client-App' => $this->config['app'],
'X-Request-Id' => app('request')->header('X-Request-Id')
];
app('rpc.logger')->info("client_request", array_merge($this->server_config, $payload));
$resp = $this->http->request('POST', 'rpc/json-rpc-v2.json', array_merge([
$resp = $this->http->request('POST', $uri, array_merge([
'headers' => $headers,
'json' => $payload,
], $options));