From b9dbc63799226d0966f05f58e0ebf4ff811279ed Mon Sep 17 00:00:00 2001 From: Ruben Verborgh Date: Tue, 24 Apr 2018 14:32:02 +0200 Subject: [PATCH] Explicitly ask for Turtle. --- scripts/YoSource.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/YoSource.js b/scripts/YoSource.js index 693d11e..aad4bbc 100644 --- a/scripts/YoSource.js +++ b/scripts/YoSource.js @@ -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()); @@ -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());