public static String httpPost(String url,Map<String,String> params){
String result = null;
CloseableHttpClient httpClient = HttpClients.createDefault();
//2.声明post请求
HttpPost httpPost = new HttpPost(url);
//3.设置请求类型
httpPost.addHeader("Content-Type","application/x-www-form-urlencoded")
httpClient的post的请求带参数传递
最新推荐文章于 2021-07-29 22:30:13 发布