Skip to content

Commit

Permalink
🐛 #3196 【公众号】修复materialImageOrVoiceDownload接口无法正常刷新AccessToken的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
shenliuming authored Dec 26, 2023
1 parent 1183ae5 commit c9d8351
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 c9d8351

Please sign in to comment.