Skip to content

Commit 08ed383

Browse files
shenliumingboris.bao
authored and
boris.bao
committed
🐛 binarywang#3196 【公众号】修复materialImageOrVoiceDownload接口无法正常刷新AccessToken的问题
1 parent 6c277b8 commit 08ed383

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

weixin-java-mp/src/main/java/me/chanjar/weixin/mp/util/requestexecuter/material/MaterialVoiceAndImageDownloadOkhttpRequestExecutor.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public InputStream execute(String uri, String materialId, WxType wxType) throws
3535
Request request = new Request.Builder().url(uri).get().post(requestBody).build();
3636
Response response = client.newCall(request).execute();
3737
String contentTypeHeader = response.header("Content-Type");
38-
if ("text/plain".equals(contentTypeHeader)) {
38+
if ("text/plain".equals(contentTypeHeader) || "application/json; charset=utf-8".equals(contentTypeHeader)) {
3939
String responseContent = response.body().string();
4040
throw new WxErrorException(WxError.fromJson(responseContent, WxType.MP));
4141
}

0 commit comments

Comments
 (0)