Skip to content

Commit

Permalink
binarywang#317 修复小程序请求二维码时对错误类型检查(text/plain 改为 app/json)
Browse files Browse the repository at this point in the history
* 更新messageSend自动向wxCpConfigStorage里获取agentId

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

* 修复小程序请求二维码时对错误类型检查(text/plain 改为 app/json)
  • Loading branch information
forfuns authored and binarywang committed Aug 18, 2017
1 parent f0d3a1a commit bf1ce7f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public File execute(String uri, WxMaQrcodeWrapper ticket) throws WxErrorExceptio
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));
}
Expand Down

0 comments on commit bf1ce7f

Please sign in to comment.