Closed nichtich closed 5 years ago
$ cat test.sparql SELECT ?t { wd:Q42 wdt:P31 ?t } $ wd sparql -v test.sparql Generated get query: https://query.wikidata.org/sparql?format=json&query=SELECT%20%3Ft%20%7B%20wd%3AQ42%20wdt%3AP31%20%3Ft%20%7D%0A Error: 403 Forbidden
GET request to the same URL with curl works. Patching lib/make_sparql_query.js to force POST request also works. I also tests other SPARQL queries. Finally I found out that the SPARQL endpoints expects a User-Agent header.
curl
lib/make_sparql_query.js
patch to add a User-Agent published in v7.5.1
v7.5.1
GET request to the same URL with
curl
works. Patchinglib/make_sparql_query.js
to force POST request also works. I also tests other SPARQL queries. Finally I found out that the SPARQL endpoints expects a User-Agent header.