Skip to content
masterclass Buddy

Node.js · Module

node:http

node:http provides low-level HTTP client and server APIs. It uses streams, so requests and responses do not need to be buffered in full.

Last updated

Since
v0.1.0

Syntax

import http from 'node:http';
const server = http.createServer((request, response) => {});
const request = http.request(options[, callback]);
const request = http.get(options[, callback]);

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • http.Agent
  • http.createServer()
  • http.get()
  • http.request()
  • http.IncomingMessage
  • http.ServerResponse
  • request.destroy()
  • request.setTimeout()

Source: HTTP | Node.js v26.13.0 Documentation. Checked 2026-11-03.