Some connections don't accept POST

Let's fix that tepomrarily
This commit is contained in:
buzz-lightsnack-2007 2024-05-15 10:04:26 +08:00
parent 8db6ca82a6
commit 0b67d23d3f

View file

@ -27,7 +27,7 @@ export default class net {
try {
// Fetch the file. Add headers when defined.
CONNECT = await fetch(URL, {method: `POST`, headers: HEADERS});
(Object.keys(HEADERS).length) ? CONNECT = await fetch(URL, {method: `POST`, headers: HEADERS}) : CONNECT = await fetch(URL);
if (CONNECT.ok && !VERIFY_ONLY) {
DATA = await CONNECT[(TYPE.toLowerCase().includes('blob')) ? `blob` : `text`]();