0

As I know, HEAD is the same as GET, but without response body. If I request resource that doesn't exist, GET will response with 404 Not Found. What status code should return HEAD request in this case? 200 OK or 404 Not Found?

Petr Flaks
  • 543
  • 2
  • 7
  • 25
  • You get a `status` response from the `http` request, and not from the method ! So for sure it will be 404 ! https://developer.mozilla.org/pt-BR/docs/Web/HTTP/Status – SachaDee Nov 14 '18 at 23:34

1 Answers1

0

As you said yourself, the response should be the same except there is no body.

This means that both the status and headers need to be the same as they would be for a GET request.

Evert
  • 93,428
  • 18
  • 118
  • 189