跳到正文

个人记录

洛谷fetch记录

Shellchen约 3 分钟
原文
文章信息与版本

文章信息

收录
2025年12月12日
更新
2025年12月21日
篇幅
约 3 分钟

版本

  1. v1当前

回复:

JavaScript
fetch("https://www.luogu.com.cn/discuss/【帖子编号】/reply", {
  "headers": {
    "accept": "application/json, text/plain, */*",
    "accept-language": "zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6",
    "content-type": "application/json",
    "priority": "u=1, i",
    "sec-ch-ua": "\"Chromium\";v=\"140\", \"Not=A?Brand\";v=\"24\", \"Microsoft Edge\";v=\"140\"",
    "sec-ch-ua-mobile": "?0",
    "sec-ch-ua-platform": "\"Windows\"",
    "sec-fetch-dest": "empty",
    "sec-fetch-mode": "cors",
    "sec-fetch-site": "same-origin",
    "x-csrf-token": "1759407583:Mjdja4q7mm7TST3jdmKj2H/3MkEQsS2tON+DrcVrj4E=",
    "x-requested-with": "XMLHttpRequest"
  },
  "referrer": "https://www.luogu.com.cn/discuss/【帖子编号】",
  "body": "{\"captcha\":\"【验证码】\",\"content\":\"【回复内容】\"}",
  "method": "POST",
  "mode": "cors",
  "credentials": "include"
});

删评:

JavaScript
fetch("https://www.luogu.com.cn/discuss/reply/【回复编号】/delete", {
  "headers": {
    "accept": "application/json, text/plain, */*",
    "accept-language": "zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6",
    "content-type": "application/json",
    "priority": "u=1, i",
    "sec-ch-ua": "\"Chromium\";v=\"140\", \"Not=A?Brand\";v=\"24\", \"Microsoft Edge\";v=\"140\"",
    "sec-ch-ua-mobile": "?0",
    "sec-ch-ua-platform": "\"Windows\"",
    "sec-fetch-dest": "empty",
    "sec-fetch-mode": "cors",
    "sec-fetch-site": "same-origin",
    "x-csrf-token": "1759407798:zOQlsC1J5zOWofcoZ1clukq1S9Hm8iu2JcioJPdlTfA=",
    "x-requested-with": "XMLHttpRequest"
  },
  "referrer": "https://www.luogu.com.cn/discuss/【帖子编号】",
  "body": "{}",
  "method": "POST",
  "mode": "cors",
  "credentials": "include"
});
原文