added expressjs server instead of python one
This commit is contained in:
9
nodeserver/test.js
Normal file
9
nodeserver/test.js
Normal file
@@ -0,0 +1,9 @@
|
||||
var XMLHttpRequest = require('./node_modules/xmlhttprequest').XMLHttpRequest;
|
||||
var xhrq = new XMLHttpRequest();
|
||||
|
||||
xhrq.open('POST', "http://localhost:8000/testrequest", true);
|
||||
xhrq.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
|
||||
xhrq.send(JSON.stringify({"Test": "Test2"}));
|
||||
xhrq.onload = function () {
|
||||
console.log(this.responseText)
|
||||
};
|
||||
Reference in New Issue
Block a user