slifty slifty - 1 month ago 21
Node.js Question

Curl equivalent in nodejs?

I'm looking to use information from an HTTP request using nodejs (i.e. call a remote web service and echo the response to the client).

In PHP I would have used curl to do this. What is the best practice in node?

Answer

See the documentation for the HTTP module for a full example:

http://nodejs.org/docs/v0.5.2/api/http.html#http.request