Skip to content

Tag: xmlhttprequest

URL of open(…) relative or absolute

I don’t quite understand the functioning of the url parameter of XMLHttpRequest open(method, url, async). Let’s say I have a web server like that: page.html sends an asynchronous request to controller.php. As we can only send requests to our own web server, I assume that we don’t have to rew…

How to use XHR API in Node.js?

This is a follow-up to my previous question Suppose I’ve some javascript code, which runs fine on client (in a browser). This code makes a lot of XHR calls using the browser API. Now I would like to run this code in node.js. Does node.js provide the XHR API as in browser ? Answer Natively Node.js does n…

How do I promisify native XHR?

Want to improve this post? Provide detailed answers to this question, including citations and an explanation of why your answer is correct. Answers without enough detail may be edited or deleted. I want to use (native) promises in my frontend app to perform XHR request but without all the tomfoolery of a mass…