java后台开发访问第三方接口(GET)
public static void main(String[] args) {
// 创建Httpclient对象
CloseableHttpClient httpclient = HttpClients.createDefault();
//微信登录的接口地址
String url = "https://api.weixin.qq.com/sns/jscode2session?appid=APPID&secret=SECRET&js_code=JSCODE&grant_type=authorization_code";
// 创建uri
URIBuilder builder =