Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CORS error for sparkl npm client in meteor 1.3 #132

Open
karabichoudhury opened this issue May 26, 2016 · 1 comment
Open

CORS error for sparkl npm client in meteor 1.3 #132

karabichoudhury opened this issue May 26, 2016 · 1 comment

Comments

@karabichoudhury
Copy link

karabichoudhury commented May 26, 2016

Hi,

I am trying to use npm package sparql(https://github.com/thomasfr/node-sparql-client) in my meteor (1.3) application.
But when i am executing the query , i get an error saying
"XMLHttpRequest cannot load http://dbpedia.org/sparql. A wildcard '*' cannot be used in the 'Access-Control-Allow-Origin' header when the credentials flag is true. Origin 'http://localhost:3000' is therefore not allowed access. The credentials mode of an XMLHttpRequest is controlled by the withCredentials attribute."

`

     import SparqlClient  from 'sparql-client';// done the import
    var endpoint = 'http://dbpedia.org/sparql';
var query = "select distinct ?Concept from <http://dbpedia.org> where {[] a ?Concept} limit 100";
var client = new SparqlClient(endpoint);
console.log("Query to " + endpoint);
console.log("Query: " + query);

client.query(query)

.execute(function(error, results) {
    console.log("error",error);
    console.log("results",results,error);
});`

I am doing this in my code. Not sure where am i going wrong. Please help,

@karabichoudhury
Copy link
Author

If anyone could help on this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant