add X-Request-Id

This commit is contained in:
dongwei 2019-03-15 14:02:20 +08:00
parent 60bc5943ff
commit d959852a56

View File

@ -95,6 +95,7 @@ class Client extends JsonRpc
try { try {
$headers = [ $headers = [
'X-Client-App' => $this->config['app'], '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)); 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', 'rpc/json-rpc-v2.json', array_merge([