Request Methods

A request sent to OBS (compatible with OpenStack Swift) must comply with HTTP 1.1. In addition, the headers of a request must contain parameters defined in IAM, for example, the authentication fields.

HTTP supports several HTTP request methods, such as GET, PUT, POST, DELETE, HEAD, and COPY. A request method indicates how to access specific resources. Table 1 describes the request methods supported by REST APIs that are provided by OBS (compatible with OpenStack Swift).

Table 1 REST request methods supported by OBS (compatible with OpenStack Swift)

Method

Description

GET

Requests the server to return a specific resource, such as a container or object list or downloaded objects.

PUT

Requests the server store a specific resource, such as a newly created container or uploaded objects.

POST

Requests the server to modify a specific resource, such as a container or object metadata.

DELETE

Requests the server to delete a specific resource, for example, an object.

HEAD

Requests the server to return the digest of a specific resource, for example, the object metadata.

COPY

Requests the server to copy a specific resource, for example, an object.

Request Headers

When sending a REST request to OBS (compatible with OpenStack Swift), you need to add parameters in request headers. For details about request headers, see the descriptions of the specific operations.

HTTP Request Rules