- Building Microservices with Go
- Nic Jackson
- 73字
- 2021-07-15 17:28:09
HEAD
A client would use the HEAD verb when they would like to retrieve the headers for a resource without the body. The HEAD verb is typically used in place of a GET verb when a client only wants to check if a resource exists or to read the metadata.
Request:
HEAD /v1/cats/12343 HTTP/1.1
Content-Type: application/json
Content-Length: 0
Response:
HTTP/1.1 200 OK
Content-Type: application/json
Last-Modified: Wed, 25 Feb 2004 22:37:23 GMT
Content-Length: 45