资 源 简 介
//1 -------获取code:031R7CVa2OF0oC00CEXa2q8BVa2R7CVD
//2 --------获取access_token和openid
String resp = HttpInvoteUtil.httpsRequest("https://api.weixin.qq.com/sns/oauth2/access_token?appid=wx8b9218b998b21d97&secret=ae26b48e037340e21aa9ed207eb6c5a5&code=0411Vm1Q1vcBqW0KGj0Q1J0g1Q11Vm1W&grant_type=authorization_code", "GET", null);
System.out.println("resp:" + resp);
//resp:{"access_token":"OezXcEiiBSKSxW0eoylIeHgXD7JcNxnSoYfB79Ld2hwSJQcWq4alkF5MbJHbjzLMSoovRk23h2el1TELuyaS1Rc9xbQ4Lgdd5U3onaoM2rAyvxgS0ZLzVc5bGZMdttwVtgmM5qZAlfVIcnUldi8Xqw","expires_in":7200,"refresh_token":"OezXcEiiBSKSxW0eoylIeHgXD7JcNxnSoYfB79Ld2hwSJQcWq4alkF5MbJHbjzLMWXvYeTkvJJU9kDV-x7iptA1jBy4Fhp-mwsp0pOYPQS9Blqljbvk7ixMNOf1UKhpIAm1K0sMDqhONrEizEqg0VA","openid":"o9rB9uGa40LVoNB0NDAtCl6uw96k","scope":"snsapi_userinfo"}