Skip to content

Commit

Permalink
Get sparql results in json
Browse files Browse the repository at this point in the history
  • Loading branch information
takanakahiko committed Oct 9, 2023
1 parent 267f8d9 commit 53aa972
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion web/server/api/middleware/sparql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export default class {
return bindings2object(resp.results.bindings, arrayParameters)
}
static async q(query: string) {
const response = await fetch(`${process.env.SPARQL_ENDPOINT_URL!}?query=${encodeURIComponent(query)}`, {
const response = await fetch(`${process.env.SPARQL_ENDPOINT_URL!}?query=${encodeURIComponent(query)}&format=json`, {
method: 'GET',
headers: { 'Content-Type': 'application/sparql-query+json' }
});
Expand Down

0 comments on commit 53aa972

Please sign in to comment.