Querying Sesame Triplestore Using Javascript
I am trying to retrieve data from a Sesame Triplestore using ajax. This is probably a CORS issue and I am trying to resolve it using CORS Filter. Is my assumption correct or do I n
Solution 1:
The specific error is (AFAIK) Chrome-specific, and has to do with the fact that Chrome does not recognize application/sparql-results+json
as a scripting-compatible media-type. To fix this, replace the mediatype with application/json
in your Accept parameter in the request.
More generally, I should point out that what you're doing here is not CORS-related. CORS is about adding a set of HTTP headers to each request/response to allow cross-domain scripting calls from browsers. Here, you are using JSONP callbacks, which is a different (older, and slightly less secure) mechanism to achieve the same end.
FWIW Sesame Server currently does not yet support CORS headers, though this is on the ToDo list: https://openrdf.atlassian.net/browse/SES-1757 .
Post a Comment for "Querying Sesame Triplestore Using Javascript"