Skip to content

Commit

Permalink
use Accept instead of site-specific query parm
Browse files Browse the repository at this point in the history
Makes it a more portable to other query services.

Haven't checked this code.
  • Loading branch information
Eric Prud'hommeaux authored Nov 13, 2019
1 parent dfe01b5 commit eb91588
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions example7.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
query = `
SELECT ?pathway WHERE { ?pathway a wp:Pathway }
`
var queryUrl = encodeURI( url+"?query="+query+"&format=json" );
fetch( queryUrl )
var queryUrl = encodeURI( url+"?query="+query );
fetch( queryUrl, {headers: {"Accept": 'application/json'}} )
.then( response => response.json() )
.then( wdk.simplify.sparqlResults )
.then( function (response) {
Expand Down

0 comments on commit eb91588

Please sign in to comment.