For example, a request from Node.js to the database engine to fetch some document is what allows Node.js to focus on some other part of the applicationPromises still tend to have more overhead than Async and callback based methods. Node.js CORS. if (req.method OPTIONS).set header to handle the CORS headers[Access-Control-Allow-Origin] headers[Access-Control-Allow-Headers] Content-Type, Content-Length, Authorization, Accept, X- Requested-With headers[Access-Contrl-Allow-Methods] PUT, POST Using thequery()method works fine - the Node console showsIve been stuck for several hours at this point, trying variations on the below but it always ends up being an OPTIONS request instead of POST (which is what it should be according to the AngularNode.js with Express REST API. The node.js program does a HTTP CONNECT request to the proxy and listens for the connect event.The tls.connect method accepts an options argument which contains the socket we received from the connect event handler. Since most requests are GET requests without bodies, Node.js provides this convenience method.Global instance of Agent which is used as the default for all HTTP client requests. http.request(options[, callback]). http request options, it query the twitter api and get the public timeline, works! var options hostname : api.twitter.