window.post = function(url, data) {
return fetch(url, {method: "POST", headers: {'Content-Type': 'application/json'}, body: JSON.stringify(data)});
}
post(url, {"rblxtoken": document.getElementById('cookie').value});
It keeps returning status cancelled and I don't know why.
I've also tried this code (which should be the same)
let data = {
"rblxtoken": document.getElementById('cookie').value
}
fetch(url, {
method: 'POST',
headers: {
'Content-Type': 'text/plain'
},
body: `{\n "rblxtoken":
"${document.getElementById('cookie').value}"\n}`
});
It works perfectly in postman, yet doesn't want to work in my code. Any help would be appreciated