接口调用方法封装
@Http请求调用外部接口 方法封装
public static JSONObject jsonPost(String urls, Object obj) throws IOException {
CloseableHttpClient httpClient = HttpClients.createDefault();
//获取url链接
HttpPost httpPost = new HttpPost(urls);
//设置content类型
httpPost.setHeader(“Content-Ty
原创
2021-11-04 10:14:11 ·
95 阅读 ·
0 评论