BramComyn / safeguard-fetch

0 stars 0 forks source link

Idea: Wrapper for RDF-contexts #31

Closed BramComyn closed 1 month ago

BramComyn commented 1 month ago

Feature description

I would like to take the next step in writing a wrapper, specifically designed for the automatic query engine/link traversal case. My idea is to detect when a response exists of RDF, through the content-type header, and then try to find the context fields. Once I can find these, I can let the user attach a handler to decide what to do with the response.

BramComyn commented 1 month ago

I am not sure whether or not this is something too high level for this project, or whether it is worth writing some sort of parser for RDF. Perhaps it is wiser to start with writing the wrapper for JSON-LD contexts.

RubenVerborgh commented 1 month ago

I think this could be useful indeed; the generic mechanism being a text/content filter. In the case of JSON-LD, context can be given in HTTP headers, or with the @context field, so not too many syntactical variations in this case.

BramComyn commented 1 month ago

This can now be rethought of as a custom class that implements DataEventHandler