When sending a CORS XMLHttpRequest to https sparql endpoint we get the 
following report in stdout and the query fails. Presumably this is coming from 
the preflight OPTIONS request required of CORS.
 
Using 2.3.1#46 in tomcat8 with default CORS configuration in web.xml.
 
[2015-10-22 17:30:54] Fuseki     INFO  [5] OPTIONS 
https://example.com/fuseki/ds/sparql
[2015-10-22 17:30:54] Fuseki     INFO  [5] OPTIONS /ds :: 'sparql' :: <none> ?
[2015-10-22 17:30:54] Fuseki     INFO  [5] 405 HTTP method not allowed: Not a 
GET or POST request (0 ms)
 
The request code looks like:
 
jQuery.ajax({
              type: "POST",
              url: endpoint,
              data: myQuery,
              contentType: "application/sparql-query",
              beforeSend: function(req) {
                     req.setRequestHeader("Accept", 
"application/sparql-results+json");
              },           
              success: function ( data ) {
                     console.log("loading data");
                     alert(“Query successful”);
                          
              }
       })           
 
Any ideas what’s going on?
 
Thanks,
--Paul
 

Reply via email to