vinod vinod - 4 months ago 11x
Node.js Question

Steps to send a https request to a rest service in Node js

What are the steps to send a https request in node js to a rest service?
I have an api exposed like

How to pass the request and what are the options I need to give for this API like
host, port, path and method?


The easiest way is to use the request module.

request('', function (error, response, body) {
  if (!error && response.statusCode == 200) {