Premium lesson

The Hypertext Transfer Protocol

Backend·3 min read·Jan 1, 2025

The Hypertext Transfer Protocol (HTTP) is a protocol for transmitting hypermedia documents, such as HTML.

While originally designed for communication between web browsers and web servers, it is nowadays also used for other purposes, such as server to server communication.

It follows a classical client-server model, with a client opening a connection to make a request, then waiting until it receives a response.

It is a stateless protocol, meaning that the server does not keep any data (state) between two requests.

Overview of an HTTP session

A typical HTTP session consist of 4 phases where:

  1. The client initiates a connection with the server using a URL and a port number.
  2. The client sends its request and waits for the response.
  3. The server processes the request.
  4. The server sends back its response.

The client HTTP request

An HTTP request is a message sent by a client to a named host in order to access a resource or perform an action on a server, which contains:

  • A request line.
  • A set of HTTP headers.
  • An optional message body.
icon light bulb key

Unlock the Build RESTful APIs in Node.js module

Learn how to build real database-backed and framework-powered RESTful APIs with MySQL, Sequelize, and Express.

You get immediate access to:

  • 37 focused lessons across MySQL, Sequelize, backend, and Express
  • 4 real-world projects with commented solutions
  • Ongoing updates to this bundle
  • Lifetime access to this bundle
Unlock this module