📅  最后修改于: 2022-03-11 14:59:10.200000             🧑  作者: Mango
let req = new XMLHttpRequest();
req.onreadystatechange = () => {
if (req.readyState == XMLHttpRequest.DONE) {
console.log(req.responseText);
}
};
req.open("POST", "https://api.jsonbin.io/c", true);
req.setRequestHeader("Content-Type", "application/json");
req.send('{"name": "Sample Collection"}');