HTTP Methods

  • OPTIONS returns the methods and header fields and values a resource supports.
  • GET retrieves data about a resource, formatted according to options indicated in the headers.
  • HEAD returns only the header part of a GET request.
  • SEARCH search for specific resources.

OPTIONS

The OPTIONS method returns information about which HTTP methods and Cantus extension headers are available for a specified request-target (URL). Although it is not a requirement of the HTTP standard, the reality of Cantus servers is that all resources of a given type and “action” (refer to A Note about URLs) will produce the same response to an OPTIONS request. Differences between different resource types with the same “action” will be minimal.

The HTTP methods allowed for a resource are indicated in the Allow header, as required in RFC 7231.

The Cantus request headers (defined in Cantus-Specific Extension Headers) applicable to a resource MUST be returned in the response to an OPTIONS request, either used for their intended purpose (like X-Cantus-Version) or with the value allow (case insensitive).

GET

The GET method returns one or more resources in the response body, depending on the URL, request headers, and request body. For the Cantus API, request bodies are ignored.