Skip to content Skip to sidebar Skip to footer

Crafting A Proper Get Request Using Node Js

Okay, very new to both javaScript and Node.js. Basically what I am trying to do is to use the asynch module (a node.js module) to make a number of asynchronous calls to a number of

Solution 1:

I believe this is because that object needs to be used within a browser. Is this true?

Not exactly.

  • XMLHttpRequest is not part of core JavaScript, it is a W3C specification
  • Browsers supply an XMLHttpRequest object, so you don't have to do anything special to use it from a browser.
  • A third party XMLHttpRequest module is available for Node.js via NPM. (I've used it for writing command line tests for a JS library that normally runs in the browser.)

You just need to install the module and require it (as per the instructions in the documentation).

Post a Comment for "Crafting A Proper Get Request Using Node Js"