首先获取token
获取微信token 接口
https://developers./doc/offiaccount/Basic_Information/Get_access_token.html
/*** 获取token* @param appId* @param secret* @return*/public String getWxToken(String appId,String secret){String accessTokenUrl ="https://api./cgi-bin/token?grant_type=client_credential&appid="+appId+"&secret="+secret;String tokenJson = WeixinUtil.httpRequest(accessTokenUrl, "GET", null);JSONObject jsonObject = JSONObject.parseObject(tokenJson);String token = jsonObject.getString("access_token");System.out.println("获取token -----" + token);return token;}
发起请求获取响应返回token字符串
/*** 发起https请求并获取结果** @para