Skip to content

Commit

Permalink
🐛 binarywang#3196 【公众号】修复materialImageOrVoiceDownload接口无法正常刷新AccessTo…
Browse files Browse the repository at this point in the history
…ken的问题
  • Loading branch information
shenliuming authored and boris.bao committed Mar 23, 2024
1 parent 6c277b8 commit 08ed383
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public InputStream execute(String uri, String materialId, WxType wxType) throws
Request request = new Request.Builder().url(uri).get().post(requestBody).build();
Response response = client.newCall(request).execute();
String contentTypeHeader = response.header("Content-Type");
if ("text/plain".equals(contentTypeHeader)) {
if ("text/plain".equals(contentTypeHeader) || "application/json; charset=utf-8".equals(contentTypeHeader)) {
String responseContent = response.body().string();
throw new WxErrorException(WxError.fromJson(responseContent, WxType.MP));
}
Expand Down

0 comments on commit 08ed383

Please sign in to comment.