{"id":"2URrDtQ4Sy","url":"https://pastebin.ca/2URrDtQ4Sy","raw_url":"https://raw.anybin.ca/2URrDtQ4Sy","visibility":"public","access":"public","created_at":1784483464587,"expires_at":1785088264587,"fetch_limit":null,"fetches_used":0,"reads_remaining":null,"size_bytes":1059,"syntax_hint":null,"title":null,"filename":null,"change_note":null,"cipher":null,"cipher_meta":null,"parent_id":null,"root_id":"2URrDtQ4Sy","version":1,"owner_id":null,"recipient_id":null,"body":"function delay(ms) {\n  return new Promise(resolve => setTimeout(resolve, ms));\n}\n\nfunction postReply(resto, content, name = '', title = '') {\n  const formdata = new FormData();\n  formdata.append(\"resto\", resto);\n  formdata.append(\"name\", name);\n  formdata.append(\"title\", title);\n  formdata.append(\"content\", content);\n\n  const requestOptions = {\n    method: \"POST\",\n    body: formdata,\n    redirect: \"follow\"\n  };\n\n  return fetch(\"/Home/Forum/doReplyThread.html\", requestOptions)\n    .then(response => response.text())\n    .then(result => {\n      console.log(\"Post reply result:\", result);\n      return result;\n    });\n}\n\nfunction getLastPost() {\n  const requestOptions = {\n    method: \"GET\",\n    redirect: \"follow\"\n  };\n\n  return fetch(\"/Api/getLastPost\", requestOptions)\n    .then(response => response.text())\n    .then(result => {\n      console.log(\"Last post result:\", result);\n      return result;\n    });\n}\n\n\ntry {\n  await postReply(\"69087758\", \"test\");\n  await delay(5000);\n  await getLastPost();\n} catch (error) {\n  console.error(\"Error:\", error);\n}\n"}