From 932ca477547d61e157eb85ab69bd5f43d6005900 Mon Sep 17 00:00:00 2001 From: JING Date: Thu, 4 Jun 2026 18:21:38 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A6=82=E6=9E=9C=E6=B2=A1=E6=9C=89=E8=BF=94?= =?UTF-8?q?=E5=9B=9EContent-Type=20=E9=BB=98=E8=AE=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/http/Response.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/http/Response.php b/src/http/Response.php index fcbad98..8c5555d 100644 --- a/src/http/Response.php +++ b/src/http/Response.php @@ -29,7 +29,9 @@ class Response if(!empty($self->source)) { $contentType = $response->getHeader('Content-Type'); if(empty($contentType)) { - throw new ApiException('反馈的消息未指明内容格式Content-Type'); + //throw new ApiException('反馈的消息未指明内容格式Content-Type'); + //如果没有默认为这个 + $contentType[0] = 'application/json; charset=utf-8'; } $bodyFormat = explode(';', $contentType[0]); switch ($bodyFormat[0]) {