The HTTP core module is a key module in Node used for networking.
import http from 'http'
You can also use frameworks build on top of it like
fastify. These frameworks are built on top of Node's core HTTP module.
The HTTP module provides 5 classes:
- http.Agent: A global instance of the http.Agent class is created to
- Efficiently manage a connection's persistance
- Reuse a single socket connection for HTTP clients
- Maintain a pool of sockets
- Ensure every request to the server is queued
- http.ClientRequest: Node creates this object when we make a request using methods like http.request() or http.get(). The
http.ClientRequestobject creates a
http.IncomingMessageobject when listening to the