public static String send(String url, JSONObject json, String encoding) throws ParseException, IOException {
String body = "";
//创建httpclient对象
CloseableHttpClient client = HttpClients.createDefault();
//创建post方式请求对象
HttpPost httpPost = new HttpPost(url);
//装填参数
StringEntity s = new StringEntity(json
Java使用Http实现post
最新推荐文章于 2024-04-29 16:26:06 发布