Requests and Responses
Most services respond to the HTTP method GET while certain others respond to both GET and POST. The applicable methods per service are described under each service group. Either protocol HTTP or HTTPs is acceptable.
The response serialization for each service is dictated by the HTTP header
Accept. The following table lists the possible return formats. Each format is described in the response section of the respective service method. Not all formats are applicable to all requests.
XHTML currently unused but may be supported in the future
CDWS determines the serialization method of the output in the following order:
- HTTP header:
- Query parameter:
- Pre-defined default per service (JSON with the exception of
/textwhich defaults to XML)
Typically, clients have their own method of setting request HTTP headers.
The following examples use the UNIX wget command line utility.
Example 1: setting the request header field
Example 2: setting the content-type as a query-string parameter
Note: All CDWS responses can be returned as either JSON or XML. The only exception is the attachment service method
/attachment/fetch which returns the image bytes with corresponding response headers
content-length appropriately populated.
Although the serialization is predetermined by the request
content-type, the response format for each service group differs. The response formats are described under their respective service groups:
- Citation Service
- Legal Status
- Custom Service Providing Application-Centric Integrated View TWS