发送json对象时,注意转成字符串 JSONObject param = "xxx"; HttpRequest.post(url) .body(param.toJSONString()) .execute().body(); 接收 public String eventQuery(@RequestBody 类 param) { //将json转成对象接收 }
hutool的HttpRequest发送post
最新推荐文章于 2024-03-23 18:13:04 发布
发送json对象时,注意转成字符串 JSONObject param = "xxx"; HttpRequest.post(url) .body(param.toJSONString()) .execute().body(); 接收 public String eventQuery(@RequestBody 类 param) { //将json转成对象接收 }