Skip to content
This repository has been archived by the owner on Aug 25, 2023. It is now read-only.

Commit

Permalink
add TODO note about conneg, see #48 (review)
Browse files Browse the repository at this point in the history
  • Loading branch information
michielbdejong committed May 7, 2019
1 parent d18229a commit 17a9e17
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/lib/api/http/HttpParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ function determineOmitBody (method: string | undefined): boolean {
}

function determineAsJsonLd (headers: http.IncomingHttpHeaders): boolean {
// TODO: use RdfType enum here and 'whatwg-mimetype' package from ResourceDataUtils
try {
return (!!headers['content-type'] && headers['content-type'].split(';')[0] === 'application/ld+json')
} catch (e) {
Expand Down
1 change: 1 addition & 0 deletions src/lib/core/basicOperations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ async function readBlob (task: WacLdpTask, blob: Blob): Promise<WacLdpResponse>
return result
}
result.resourceData = await streamToObject(await blob.getData())
// TODO: use RdfType enum here
if (task.asJsonLd) {
const rdf = resourceDataToRdf(result.resourceData)
result.resourceData = await rdfToResourceData(rdf, true)
Expand Down

0 comments on commit 17a9e17

Please sign in to comment.