Sobes.tech
Junior — Middle

For which types of HTTP requests is the request body absent?

sobes.tech AI

Answer from AI

The request body is absent in HTTP requests of type GET, HEAD, and DELETE (in most cases).

  • GET — used to retrieve data, and the body is usually not transmitted.
  • HEAD — similar to GET, but only returns headers, without a body.
  • DELETE — sometimes does not contain a body, although the specification does not prohibit it, but more often, the body is not used.

Unlike them, POST and PUT usually contain a body with data to be transmitted to the server.