...
The response serialization for each service is dictated by the request 'content-type' HTTP header (Accept)HTTP header Accept
. The following table lists the possible return formats. Each format will be described in the response section of the respective service method. Not all formats are applicable to all requests.
Accept | Request Content-Type | Serialization |
---|---|---|
application/json | JSON | |
text/xml | XML | |
text/html | XHTML currently unused but may be supported in the future |
...
CDWS determines the serialization method of the output in the following order:
- HTTP header: content-type
Accept
- Query parameter:
content-type
- Pre-defined default per service (usually JSONJSON with the exception of
/text
which defaults to XML)
Typically, clients will have their own method of setting request HTTP headers.
The following examples use the UNIX wget command line utility
...
Code Block |
---|
wget -O- \ --header 'x-user: x' \ --header 'x-password: y' \ --header="Content-TypeAccept:text/xml" 'http://cdws.ificlaims.com/search/query?q=pn:ep-0700000-b1' |
...
Code Block |
---|
wget -O- \ --header 'x-user: x' \ --header 'x-password: y' \ 'http://cdws.ificlaims.com/search/query?q=solr&content-type=text/xml' |
Note |
---|
...
All CDWS responses can be either returned as JSON or XML. The only exception is the attachment service method |
...
the image bytes with corresponding response headers |
Although the serialization is predetermined by the request content-type, the response format for each service group differs. The response formats will be described under their respective service groups.