换用JoddGetRequestExecutor

解决NoHttpResoponseException问题
This commit is contained in:
YuJian 2016-01-11 21:17:46 +08:00
parent 779e36b1fa
commit 54ced62f30

View File

@ -1051,7 +1051,7 @@ public class WxMpServiceImpl implements WxMpService {
synchronized (globalCardApiTicketRefreshLock) {
if (wxMpConfigStorage.isCardApiTicketExpired()) {
String url = "https://api.weixin.qq.com/cgi-bin/ticket/getticket?type=wx_card";
String responseContent = execute(new SimpleGetRequestExecutor(), url, null);
String responseContent = execute(new JoddGetRequestExecutor(), url, null);
JsonElement tmpJsonElement = Streams.parse(new JsonReader(new StringReader(responseContent)));
JsonObject tmpJsonObject = tmpJsonElement.getAsJsonObject();
String cardApiTicket = tmpJsonObject.get("ticket").getAsString();