- 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