-
Bug
-
Resolution: Fixed
-
Normal
-
None
-
None
For instance when using curl to make a request and setting Accept header to accept JSON-LD (application/ld+json) works fine:
C:\>curl https://musicbrainz.org/artist/22a1f4d7-81ff-4216-ac06-3387da6bc118 -H "Accept: application/ld+json" -k -I
HTTP/1.1 200 OK
Date: Mon, 21 Dec 2015 17:02:57 GMT
Content-Type: application/ld+json; charset=utf-8
Content-Length: 11744
Connection: keep-alive
Keep-Alive: timeout=20
Server: nginx/1.4.6 (Ubuntu)
But many Linked Data applications specify multiple MIME types in the request header for example JSON-LD and Turtle, in which case MusicBrainz returns the text/html representation:
C:\>curl https://musicbrainz.org/artist/22a1f4d7-81ff-4216-ac06-3387da6bc118 -H "Accept: application/ld+json, text/turtle" -k -I
HTTP/1.1 200 OK
Date: Mon, 21 Dec 2015 17:04:41 GMT
Content-Type: text/html; charset=utf-8
Content-Length: 0
Connection: keep-alive
Keep-Alive: timeout=20
Server: nginx/1.4.6 (Ubuntu)
In such cases it would be preferable to return the JSON-LD representation.
- has related issue
-
MBS-8787 Add CORS headers to JSON-LD responses
- Closed