改名
This commit is contained in:
@@ -136,7 +136,7 @@ class Http2 extends Component
|
|||||||
/** @var Response $response */
|
/** @var Response $response */
|
||||||
$response = $client->recv();
|
$response = $client->recv();
|
||||||
if ($response === false || $response->statusCode > 200) {
|
if ($response === false || $response->statusCode > 200) {
|
||||||
throw new Exception($client->errMsg, $response->statusCode);
|
throw new Exception($client->errMsg, $response->statusCode ?? 500);
|
||||||
}
|
}
|
||||||
$header = $response->headers['content-type'];
|
$header = $response->headers['content-type'];
|
||||||
if (str_starts_with($header, 'application/json;')) {
|
if (str_starts_with($header, 'application/json;')) {
|
||||||
|
|||||||
Reference in New Issue
Block a user