Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

javascript xhr set parameters

var http = new XMLHttpRequest();
var url = "url";
var params = JSON.stringify({ appoverGUID: approverGUID });
http.open("POST", url, true);

http.setRequestHeader("Content-type", "application/json; charset=utf-8");
http.setRequestHeader("Content-length", params.length);
http.setRequestHeader("Connection", "close");

http.onreadystatechange = function() {
    if(http.readyState == 4 && http.status == 200) {
        alert(http.responseText);
    }
}
http.send(params);
Comment

PREVIOUS NEXT
Code Example
Javascript :: javascript add to undefined 
Javascript :: javascript injection in mongodb 
Javascript :: supertest expect content type 
Javascript :: Getting Search Parameters From A URL As An Array 
Javascript :: how to check if element is in viewport javascript 
Javascript :: react icons cdn 
Javascript :: react native notify user for new version of app 
Javascript :: how to use of socket io on a route in nodejs 
Javascript :: vscode new file shortcut 
Javascript :: how to change css using javascript 
Javascript :: angular blockly 
Javascript :: How to concatenate two textbox values in JavaScript 
Javascript :: coderbyte find intersection solutions 
Javascript :: how to add row in angular dynamically 
Javascript :: programmatically create a custom cron job drupal 7 
Javascript :: how to loop through all tags in html 
Javascript :: configure angular router apache 
Javascript :: json schema bsp 
Javascript :: joi not empty string 
Javascript :: add image inside a div on specific position javascript 
Javascript :: sort dates javascript 
Javascript :: edit json text react 
Javascript :: href before onclick js 
Javascript :: svelte on destroy 
Javascript :: javascript compress base64 image 
Javascript :: nodejs ERR_CONNECTION_REFUSED 
Javascript :: how to update specific key of an object in reducer 
Javascript :: cheerio library to parse the meta tags in url 
Javascript :: how to check for special charaters with spaces javascript 
Javascript :: uncaught type error event listener error 
ADD CONTENT
Topic
Content
Source link
Name
2+1 =