Closed eroux closed 6 years ago
Fixed in commit e25ae2e - Supported Accept header values :
text/turtle application/n-triples application/n-quads text/trig=trig application/rdf+xml application/owl+xml application/ld+json application/rdf+thrift application/rdf+thrift application/json application/trix+xml
Reopening due to the wrong result of:
curl -XPOST -v -sSL 'http://purl.bdrc.io/graph/IIIFPres_itemGraph' -H 'Accept: text/turtle' -d '{"R_RES":"bdr:I22084"}'
which returns an error instead of ttl, and
curl -v -sSL 'http://purl.bdrc.io/graph/IIIFPres_itemGraph?R_RES=bdr:I22084' -H 'Accept: text/turtle'
which returns jsonld instead of ttl
(also, I won't close the issue unless some unit tests appear)
There were two issues: 1) The conversion from mime types to jena MediaType was wrong and default was set to jsonld (error 2) 2) The graph service only accepts application/json contentType and it looks like curl has its default post contentType set to application/x-www-form-urlencoded. Therefore, the contentType must be set in the command line when it is different from the default.(error 1)
curl -v -sSL "http://purl.bdrc.io/graph/IIIFPres_itemGraph" -H "Accept: text/turtle" -H "Content-Type: application/json" -d '{"R_RES":"bdr:I22084"}'
Fixed as of commit ed49c34. Unit tests will soon follow.
Thanks! Can you update the version on ec2?
Now when I run:
I'm getting a strange result: the header of the response says it's ttl:
while the content is clearly jsonld: