zoukankan      html  css  js  c++  java
  • httpClient 进行get请求

     1         String url = baseUrl;
     2         logger.info("checkIfTheFolderIsExist");
     3         CloseableHttpClient httpClient = HttpClientBuilder.create().build();
     4         URI uri = new URIBuilder()
     5                 .setPath(url)
     6                 .setParameter("token", token)
     7                 .setParameter("folderName", folderName)
     8                 .setParameter("folderId", folderId)
     9                 .build();
    10         HttpGet get = new HttpGet(uri);
    11         CloseableHttpResponse response = httpClient.execute(get);
    12         logger.info(EntityUtils.toString(response.getEntity(), "utf-8"));        

    可参考 https://blog.csdn.net/justry_deng/article/details/81042379 

    https://www.cnblogs.com/Vdiao/p/5339487.html

  • 相关阅读:
    2
    异常处理
    接口
    抽象与多态
    关联关系
    9-13
    数据类型转换
    Day3
    对象和类
    MyEclipse导入现成项目出现小红叉错误
  • 原文地址:https://www.cnblogs.com/yangxiaobo-blog/p/11547825.html
Copyright © 2011-2022 走看看