Merge pull request #39 from o-development/fix/accept-header

Adds preference for text/turtle to accept on read requests
main
jaxoncreed 1 year ago committed by GitHub
commit 8b04651e43
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 4
      packages/solid/src/requester/requests/readResource.ts

@ -99,7 +99,9 @@ export async function readResource(
try { try {
const fetch = guaranteeFetch(options?.fetch); const fetch = guaranteeFetch(options?.fetch);
// Fetch options to determine the document type // Fetch options to determine the document type
const response = await fetch(uri); const response = await fetch(uri, {
headers: { accept: "text/turtle, */*" },
});
if (response.status === 404) { if (response.status === 404) {
return { return {
isError: false, isError: false,

Loading…
Cancel
Save