I'm actually working on a SparQL viewer but i got an issue with my POST request, someone can told me what's wrong ?
var req = { method: 'POST',
url: 'http://dbpedia.org/sparql',
headers: { 'Content-type' : 'application/x-www-form-urlencoded',
'Accept' : 'application/sparql-results+json' },
data: { query : "SELECT * WHERE { <http://dbpedia.org/resource/Awolnation> ?pref ?obj } LIMIT 10",
format: "sparql-results+json",
timeout : 3000 }
};
$http(req).success(function(data) {
console.log(data);
});
EDIT : my bad i forgot the issue
POST http://dbpedia.org/sparql 400 (Bad Request)
I think it's a GET query and
format=json
like :It's work when Dbpedia endpoint is not down :).