DEV Community

Larissa Bizzi
Larissa Bizzi

Posted on

2

About HTTP : request, response and methods

I am studying the RESTful API development and it begins with some recap about HTTP. Let's talk about it. 😊

5 HTTP common methods (also called HTTP verbs):

  • GET -> retrieves a ressource;
  • POST -> sends data to the server and creates a record;
  • PUT -> updates the whole ressource;
  • PATCH -> partially updates a ressource;
  • DELETE -> deletes a ressource.

A HTTP request includes:

  • version type;
  • URL;
  • HTTP method;
  • request headers (ex. cookies, user-agents, referrers);
  • body (optional).

The HTTP response contains the resource that was requested. It also contains information like the length of the content, the content type, and headers like cookies. It also contains ETags, the time when the content was last modified, and finally, the response also contains some special numerical codes called HTTP status codes.

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more