Skip to main content

What is HTTP?

What is HTTP?

Key takeaways

  • HTTP is a stateless request and response protocol, which is why sessions need cookies or tokens.
  • Methods, status codes and headers carry the meaning, not the body alone.
  • Understanding status codes is the fastest way to debug most web problems.

The HTTP (Hypertext Transfer Protocol) is an application protocol designed to enable communications between clients and servers, and the foundation of data communication for the World Wide Web.
HTTP provide a standard way of communication between client (browsers) and web servers.

HTTP works as a request-response protocol, the web browser may be the client, and an application on a computer that hosts a web site may be the server.
For example when the client (browser) submits an HTTP request to the server, the server returns a response to the client with additional information.

HTTP is a stateless protocol because each command is executed independently of the previous commands.

From the browser, in order to access a URL you have to add the http:// command before the URL address (http://www.example.com). These days you can skip it, and the browsers will add it for you automatically when you enter an address in the URL bar.
If you want to access from the browser a HTTPS URL (Hypertext Transfer Protocol over Secure) you have to specify it manually.

Frequently Asked Questions

What is HTTP?

A stateless request and response protocol between clients and servers. Stateless is the important word: the server does not remember previous requests on its own.

If it is stateless, how do sessions work?

Through cookies or tokens sent with each request. The continuity you experience as a logged-in session is reconstructed every time from what the client sends.

What is the fastest way to debug a web problem?

Read the status code. Methods, status codes and headers carry most of the meaning, and the code usually tells you which side of the exchange to investigate.

Bogdan

Founder at LoadFocus

Bogdan builds and runs the tools this blog is about. He writes from what the products actually do in production, including the parts that break.

Weekly tips right in your inbox.

Don’t miss out on the latest testing tips and tricks, tools and news related to software testing.

Already +20,000 members in the list.

The Load Testing Platform with AI That Explains Your Results

Load test websites and APIs from 25 cloud regions, monitor page speed and uptime, and get AI analysis that explains your results in plain English.

Cloud load testing, website speed and API monitoring in one place.

Hi there! Can I share a cool thing I'm working on with you?

A software testing newsletter that sparks joy.

Our goal is to create helpful content for software developers and testers.

If you're not into it, you can unsubscribe instantly.