0
点赞
收藏
分享

微信扫一扫

前端预览pdf文件(后端返回pdf文件流)

三次方 2024-06-06 阅读 20
c#
     try {
//            拿到当前剩余余下的钱
            Document doc = Jsoup.connect(url)
                    .header("Authorization", "Bearer " + apiKey)
                    .header("Content-Type", "application/json")
                    .header("Connection", "keep-alive")
                    .data("type", "draw")  // 添加form-data参数
                    .requestBody("""
                             {"name":11,
                             "password":22
                             }
                             """)  //添加body参数
                    .ignoreContentType(true) //忽略所有请求参数
                    .ignoreHttpErrors(true) //忽略所有异常
                    .timeout(200000)
                    .get();



//                拿到一共剩余
            String html = doc.text(); // 获取HTML代码
            JSONObject json =JSONObject.parseObject(html); // 将HTML代码转换为JSON对象
            String total_granted = json.getString("total_granted"); // 一共

配置上面参数最后转换成json格式就可以使用了 对应的jar包可以问我的ai

https://0.00000.work

举报

相关推荐

0 条评论