Closed michielbdejong closed 4 years ago
cc @jaxoncreed ^ the thing we talked about just now in regards to https://github.com/inrupt/solid-server-ts/issues/35#issuecomment-538376666
parsedBody
should likely be of more specific type; otherwise for its inclusion in addition to body
.
Is it still correct that Patch
extends Representation
as in https://github.com/inrupt/solid-server-ts/blob/master/src/ldp/IPatch.ts#L7? Because I think a sparql-update query is a representation of a patch, but a (parsed) patch object is not, right?
Patch
could either extend Representation
or point to the representation. Access to the underlying body, even within a parsed object, remains important because some back-ends will need the original text. Take a application/sparql-update
body: we need to parse it to determine required permissions, but if that back-end is (for instance) a SPARQL endpoint, it will take the original body rather than the parsed version.
Okay. I'll make it extend Representation then.
Done in 3439fc93e8b31a9371d3b629c6fe989f49603cd4.
It now says:
Looking at https://github.com/RubenVerborgh/solid-server-ts/blob/master/src/http/ResourceStoreRequestHandler.ts#L120-L126, that instead should be: