/** * * @Description: 节点生成文书,返回字符串(目前仅有组庭、受理) * @param url * @param caseId * @param jsonData * @return * @throws BusinessException * @throws IOException */ //@Async public JsonResult<String> sendPostMessageMap(String url,String caseId,Map jsonMap) throws BusinessException, IOException{ InputStreamReader inputStreamReader = null; try { HttpClient client = HttpPoolUtil.getHttpClient(); HttpPost post = new HttpPost(url); //添加请求头 //post.setHeader("User-Agent", "Mozilla/5.0"); post.setHeader("User-Agent", "Mozilla/5.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; QQDownload 1.7; .NET CLR 1.1.4322; CIBA; .NET CLR 2.0.50727)"); List<NameValuePair> urlParameters = new ArrayList<NameValuePair>(); if(!StringUtils.isEmpty(caseId)) { urlParameters.add(new BasicNameValuePair("caseId", caseId)); }
使用HttpClient发送post请求
最新推荐文章于 2024-03-18 15:51:31 发布
![](https://img-home.csdnimg.cn/images/20240611030827.png)