What are the different HTTP methods in Node.js?
There are three HTTP methods in NodeJS. They are:
- http.createServer(): This is used to create a new instance of the http.server class.
- http.request(): This is used for making an HTTP request to the server by creating an instance of the http.ClientRequest class.
- http.get(): It is very much similar to the http.request() method, but it automatically sets the HTTP method to GET and calls the req.end().
Also Read: What's New for Node.js in 2020
Suggest An Answer
No suggestions Available!