Skip to content
This repository has been archived by the owner on Nov 26, 2022. It is now read-only.

Commit

Permalink
Explicitly ask for Turtle.
Browse files Browse the repository at this point in the history
  • Loading branch information
RubenVerborgh committed Apr 24, 2018
1 parent 95ab885 commit b9dbc63
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions scripts/YoSource.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ class YoSource {
return this._yos;

// Fetch and parse the source document
const document = await this._fetch(this._source);
const document = await this._fetch(this._source, {
headers: { 'Accept': 'text/turtle' },
});
const parser = new N3.Parser({ baseIRI: this._source });
const quads = parser.parse(await document.text());

Expand Down Expand Up @@ -87,7 +89,9 @@ class YoSource {
// Try dereferencing the entity to obtain its label
try {
// Retrieve and parse the document
const document = await this._fetch(entity.value);
const document = await this._fetch(entity.value, {
headers: { 'Accept': 'text/turtle' },
});
const parser = new N3.Parser({ baseIRI: entity.value });
const quads = parser.parse(await document.text());

Expand Down

0 comments on commit b9dbc63

Please sign in to comment.