-
Notifications
You must be signed in to change notification settings - Fork 13
Description
HttpClient.php 99 行开始,X-Request-Id要都改为小写
} catch (RequestException $e) { if ($e->hasResponse()) { $response = $e->getResponse(); if (isset($this->httpHandler)) { $this->httpHandler->processResponse(['response' => $response, 'logger' => $this->logger]); } $responseStatusCode = $response->getStatusCode(); $requestId = $response->getHeaders()['x-request-id'][0]; $responseBody = $response->getBody(); $sdkError = $this->getSdkErrorMessage($requestId, $responseBody, $responseStatusCode); if (isset($response->getHeaders()['content-length'])) { $contentLength = $response->getHeaders()['content-length'][0]; } else { $contentLength = 0; } if (isset($this->logger)) { $this->logger->addInfo(' "'.$sdkRequest->method.' '. $sdkRequest->url.'" ' .' '.$response->getStatusCode().' '.$contentLength .' '.$response->getHeaders()['x-request-id'][0]); } /* if (400 <= $responseStatusCode and $responseStatusCode < 500) { throw new ClientRequestException($responseStatusCode, $sdkError); } else { throw new ServerResponseException($responseStatusCode, $sdkError); } */ } else { $this->getExceptionType($e->getMessage()); }