Advertisement
hivefans

fetchlove.js

May 29th, 2023
947
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JavaScript 0.85 KB | Cryptocurrency | 0 0
  1. function fetchData() {
  2. fetch("https://love.game/api/markle", {
  3. "headers": {
  4. "accept": "application/json, text/plain, */*",
  5. "accept-language": "en-US,en;q=0.9,zh-CN;q=0.8,zh;q=0.7",
  6. "content-type": "application/json",
  7. "sec-ch-ua": "\"Google Chrome\";v=\"113\", \"Chromium\";v=\"113\", \"Not-A.Brand\";v=\"24\"",
  8. "sec-ch-ua-mobile": "?0",
  9. "sec-ch-ua-platform": "\"macOS\"",
  10. "sec-fetch-dest": "empty",
  11. "sec-fetch-mode": "cors",
  12. "sec-fetch-site": "same-origin"
  13. },
  14. "referrer": "https://love.game",
  15. "referrerPolicy": "strict-origin-when-cross-origin",
  16. "body": "{\"address\":\"你的地址\"}",
  17. "method": "POST",
  18. "mode": "cors",
  19. "credentials": "omit"
  20. })
  21. .then(response => response.json())
  22. .then(data => {
  23. console.log(data); // 输出返回的数据
  24. })
  25. .catch(error => {
  26. console.error(error); // 输出错误信息
  27. });
  28. }
  29. setInterval(fetchData, 5000);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement