let xhr = new XMLHttpRequest();
let data = JSON.stringify({
//some data...
});
xhr.open('POST', '/users');
xhr.setRequestHeader("Content-Type", "application/json");
xhr.send(data);
let time;
time = JSON.stringify({
us: true,
});
setInterval(() => {xhr.send(time);}, 5000);
错误:未捕获的 DOMException:无法在“XMLHttpRequest”上执行“发送”:对象的状态必须是 OPENED
不负相思意
相关分类