Open pietercolpaert opened 7 years ago
Refactoring should look like this:
HTTP+HTTPS+HTTP2 nodejs module ↓ cacheable-request module -- make this configurable ↓ follow-redirects module (and before this step, this HTTP is also the base for the HTTP module of follow-redirect module) ↓ Decompress: https://www.npmjs.com/package/decompress-response ↓ This is the NodeHTTPFetcher (this is also the base for the JSON-LD document loader)
NodeJS starts from the NodeHTTPFetcher as documented above. The Browser version starts from the browser fetch module, which already implements all of the above. ↓ Promisify result of a HTTP request ↓ Deserializer (popular RDF serializations, conneg, ...) ↓ Extract metadata such as:
Important is that we should always be able to stop a request
Being tackled in https://github.com/pietercolpaert/ldfetch/tree/fix-6
Related to #4 and #5
To be used for the JSON-LD document loader