|
|
@@ -48,7 +48,7 @@ public class QrCodeRequestExecutor implements RequestExecutor<File, WxMaQrcodeWr |
|
|
|
InputStream inputStream = InputStreamResponseHandler.INSTANCE.handleResponse(response);) { |
|
|
|
Header[] contentTypeHeader = response.getHeaders("Content-Type"); |
|
|
|
if (contentTypeHeader != null && contentTypeHeader.length > 0 |
|
|
|
&& ContentType.TEXT_PLAIN.getMimeType().equals(contentTypeHeader[0].getValue())) { |
|
|
|
&& ContentType.APPLICATION_JSON.getMimeType().equals(contentTypeHeader[0].getValue())) { |
|
|
|
String responseContent = Utf8ResponseHandler.INSTANCE.handleResponse(response); |
|
|
|
throw new WxErrorException(WxError.fromJson(responseContent)); |
|
|
|
} |
|
|
|