cURL equivalent in Node.js?

Issue

I’m looking to use information from an HTTP request using Node.js (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?

Solution

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

https://nodejs.org/api/http.html#http_http_request_options_callback

Answered By – Dan Grossman

Answer Checked By – Terry (AngularFixing Volunteer)

Leave a Reply

Your email address will not be published.