mirror of
				https://gitee.com/binary/weixin-java-tools.git
				synced 2025-10-31 02:28:25 +08:00 
			
		
		
		
	🐛 #3196 【公众号】修复materialImageOrVoiceDownload接口无法正常刷新AccessToken的问题
This commit is contained in:
		| @ -35,7 +35,7 @@ public class MaterialVoiceAndImageDownloadOkhttpRequestExecutor extends Material | |||||||
|     Request request = new Request.Builder().url(uri).get().post(requestBody).build(); |     Request request = new Request.Builder().url(uri).get().post(requestBody).build(); | ||||||
|     Response response = client.newCall(request).execute(); |     Response response = client.newCall(request).execute(); | ||||||
|     String contentTypeHeader = response.header("Content-Type"); |     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(); |       String responseContent = response.body().string(); | ||||||
|       throw new WxErrorException(WxError.fromJson(responseContent, WxType.MP)); |       throw new WxErrorException(WxError.fromJson(responseContent, WxType.MP)); | ||||||
|     } |     } | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user