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)

Heroku

Simplify your DevOps and maximize your time.

Since 2007, Heroku has been the go-to platform for developers as it monitors uptime, performance, and infrastructure concerns, allowing you to focus on writing code.

Learn More

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay