Преглед изворни кода

#317 修复小程序请求二维码时对错误类型检查(text/plain 改为 app/json)

* 更新messageSend自动向wxCpConfigStorage里获取agentId

* 修复小程序请求二维码时对错误类型检查(text/plain 改为 app/json)

* 修复小程序请求二维码时对错误类型检查(text/plain 改为 app/json)
master
forfuns пре 7 година
committed by Binary Wang
родитељ
комит
9ee671e6e6
1 измењених фајлова са 1 додато и 1 уклоњено
  1. +1
    -1
      weixin-java-miniapp/src/main/java/cn/binarywang/wx/miniapp/util/http/QrCodeRequestExecutor.java

+ 1
- 1
weixin-java-miniapp/src/main/java/cn/binarywang/wx/miniapp/util/http/QrCodeRequestExecutor.java Прегледај датотеку

@@ -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));
}


Loading…
Откажи
Сачувај