Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function fetchData() {
- fetch("https://love.game/api/markle", {
- "headers": {
- "accept": "application/json, text/plain, */*",
- "accept-language": "en-US,en;q=0.9,zh-CN;q=0.8,zh;q=0.7",
- "content-type": "application/json",
- "sec-ch-ua": "\"Google Chrome\";v=\"113\", \"Chromium\";v=\"113\", \"Not-A.Brand\";v=\"24\"",
- "sec-ch-ua-mobile": "?0",
- "sec-ch-ua-platform": "\"macOS\"",
- "sec-fetch-dest": "empty",
- "sec-fetch-mode": "cors",
- "sec-fetch-site": "same-origin"
- },
- "referrer": "https://love.game",
- "referrerPolicy": "strict-origin-when-cross-origin",
- "body": "{\"address\":\"你的地址\"}",
- "method": "POST",
- "mode": "cors",
- "credentials": "omit"
- })
- .then(response => response.json())
- .then(data => {
- console.log(data); // 输出返回的数据
- })
- .catch(error => {
- console.error(error); // 输出错误信息
- });
- }
- setInterval(fetchData, 5000);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement