HEAD Bucket

Indicates if a bucket exists and whether the requester has READ access to it.

If you make a HEAD request that's scoped to a bucket that doesn't exist, you will get a 404 Not Found status code and the body of the error response will contain NoSuchBucket in the Code element.

Query string parameters

This request does not include query string parameters.

Request headers

Header Description Required
Authorization The authentication string for the request. Yes
Content-Length

The length of the request body without headers (in bytes).

No
Date The date and time of the request. No
Host The URI for Cloud Storage. For more information, see Request Endpoints. Yes

Request body elements

This request does not include an XML document in the request body.

Request syntax

HEAD / HTTP/1.1
Host: <bucket>.storage.googleapis.com
Date: <date>
Content-Length: 0
Authorization: <authentication string>

Response headers

The request returns standard response headers.

Response body elements

The response does not include an XML document in the response body. Error responses to HEAD requests also do not contain a response body.

Example

The following sample shows a HEAD request for a bucket named travel-maps.

Request

HEAD / HTTP/1.1
Host: travel-maps.storage.googleapis.com
Authorization: Bearer ya29.AHES6ZRVmB7fkLtd1XTmq6mo0S1wqZZi3-Lh_s-6Uw7p8vtgSwg

Response

HTTP/1.1 200 OK
...
이 페이지가 도움이 되었나요? 평가를 부탁드립니다.

다음에 대한 의견 보내기...

도움이 필요하시나요? 지원 페이지를 방문하세요.