Adds preference for text/turtle to accept on read requests

main
Jackson Morgan 1 year ago
parent 12eb9c74c8
commit 8f9d14c7e5
  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