URL url = this.getClass().getResource("/tgvoucher/005.json");//文件路径
String string = FileUtils.toFile(url).toString();//转化String
HttpResponse response = HttpRequest.post(URL)
.body(this.getRequestData(FileUtils.toFile(url)).toJSONString(), "application/json;charset=utf-8")
.execute();//传到第三放系统,URL为接收地址
eclipse读取资源文件夹下json文件并转化为字符串通过http传给第三方系统
最新推荐文章于 2023-04-10 23:45:58 发布