Content Negotiation
When performing a request against Nexus Delta, clients can specify the desired format of the response they would like to receive. This is done through a mechanism called Content Negotiation. Nexus Delta uses the HTTP Accept Header in order to provide Content Negotiation capabilities.
Example
curl -H "Accept: application/json" "http://localhost:8080/v1/version"
Supported MIME types
Most of the Nexus Delta resources (except for querying the different indices and fetching files) support the following MIME types on the Accept
Header:
- application/ld+json: JSON-LD output response. Further specifying the query parameter
format=compacted|expanded
will provide with the JSON-LD compacted document form or the expanded document form. - application/n-triples: RDF n-triples response, as defined by the w3.
- application/n-quads: RDF n-quads response, as defined by the w3.
- text/vnd.graphviz: A DOT response.
If Accept: */*
HTTP header is present, Nexus defaults to the JSON-LD output in compacted form.
Snapshot