database icon indicating copy to clipboard operation
database copied to clipboard

jsonp support

Open ecow opened this issue 4 years ago • 0 comments

It is possible to add jsonp support so overcame CORS limitation?

This should make blazegraph compatible with great tools like (https://github.com/LodLive/LodLive).

My proposal is to add the callback parameter to GET/POST in REST APIs like in dbpedia (i.e. virtuoso). The callback parameter should be used only when format=json or format=application/sparql-results+json

Example:

no callback

http://dbpedia.org/sparql?default-graph-uri=http%3A%2F%2Fdbpedia.org&query=select+distinct+%3FConcept+where+%7B%5B%5D+a+%3FConcept%7D+LIMIT+100&format=application%2Fsparql-results%2Bjson&CXML_redir_for_subjs=121&CXML_redir_for_hrefs=&timeout=30000&debug=on&run=+Run+Query+

callback

http://dbpedia.org/sparql?callback=lodlive&default-graph-uri=http%3A%2F%2Fdbpedia.org&query=select+distinct+%3FConcept+where+%7B%5B%5D+a+%3FConcept%7D+LIMIT+100&format=application%2Fsparql-results%2Bjson&CXML_redir_for_subjs=121&CXML_redir_for_hrefs=&timeout=30000&debug=on&run=+Run+Query+

See also: https://stackoverflow.com/questions/16097763/jsonp-callback-function#16097864

ecow avatar Nov 15 '19 11:11 ecow