Skip to content

Instantly share code, notes, and snippets.

@RubenVerborgh
Last active August 29, 2015 14:14
Show Gist options
  • Save RubenVerborgh/e075a1e43c419fd74d11 to your computer and use it in GitHub Desktop.
Save RubenVerborgh/e075a1e43c419fd74d11 to your computer and use it in GitHub Desktop.
# Without content negotiation, we get back an invalid content type
$ curl -LI http://rdf.ebi.ac.uk/dataset/atlas/13.07
HTTP/1.1 303 See Other
Server: Apache/2.2.15 (Red Hat)
Content-Type: text/html; charset=iso-8859-1
Date: Wed, 04 Feb 2015 11:36:31 GMT
Location: https://www.ebi.ac.uk/rdf/services/atlas/servlet/explore?uri=http://rdf.ebi.ac.uk/dataset/atlas/13.07
Transfer-Encoding: chunked
Connection: Keep-Alive
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: GET, POST
Access-Control-Allow-Headers: Content-Type
Access-Control-Max-Age: 1
Content-Type: application/rdf+n3
Content-Length: 2559
Date: Wed, 04 Feb 2015 11:36:31 GMT
# Trying content negotiation, I get back HTML
$ curl -H "Accept: text/turtle;1.0,text/html;0.5" -LI http://rdf.ebi.ac.uk/dataset/atlas/13.07
HTTP/1.1 303 See Other
Server: Apache/2.2.15 (Red Hat)
Content-Type: text/html; charset=iso-8859-1
Date: Wed, 04 Feb 2015 11:40:15 GMT
Location: https://www.ebi.ac.uk/rdf/services/atlas/describe?uri=http://rdf.ebi.ac.uk/dataset/atlas/13.07
Transfer-Encoding: chunked
Connection: Keep-Alive
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Type: text/html;charset=ISO-8859-1
Access-Control-Max-Age: 1
Date: Wed, 04 Feb 2015 11:40:16 GMT
Access-Control-Allow-Origin: *
Accept-Ranges: bytes
ETag: W/"13062-1384768246000"
Last-Modified: Mon, 18 Nov 2013 09:50:46 GMT
Access-Control-Allow-Methods: GET, POST
Access-Control-Allow-Headers: Content-Type
Content-Length: 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment