📅  最后修改于: 2022-03-11 15:03:52.838000             🧑  作者: Mango
var request = new XMLHttpRequest(),
token = document.querySelector('meta[name="csrf-token"]').content;
request.open('POST', url, true);
request.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');
request.setRequestHeader('X-CSRF-TOKEN', token);
request.send(data);