js xmlhttprequest add header
XMLHttpRequest.setRequestHeader(header, value)
js xmlhttprequest add header
XMLHttpRequest.setRequestHeader(header, value)
xhr post send
var xhr = new XMLHttpRequest();
var params = 'field1='+postfield1+'&field2='+postfield2;
xhr.open('POST', 'http://exmaple.com', true);
//Send the proper header information along with the request
xhr.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
xhr.onload = function() {//Call a function when the state changes.
if(xhr.status == 200) {
alert(this.responseText);
}
}
xhr.send(params);
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us