From 5930e7b9fcb239c470aef6777292e9f980db53ef Mon Sep 17 00:00:00 2001 From: dongwei Date: Wed, 3 Jul 2019 13:19:40 +0800 Subject: [PATCH] add x-request-id defautl if under no-http-request --- src/Client.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Client.php b/src/Client.php index 304b9a1..4213868 100644 --- a/src/Client.php +++ b/src/Client.php @@ -96,7 +96,7 @@ class Client extends JsonRpc try { $headers = [ 'X-Client-App' => $this->config['app'], - 'X-Request-Id' => app('request')->header('X-Request-Id') + 'X-Request-Id' => app('request')->header('X-Request-Id', md5(uniqid())) ]; app('rpc.logger')->info("client_request", array_merge($this->server_config, $payload)); $resp = $this->http->request('POST', $uri, array_merge([