ckan / ckanext-dcat

CKAN ♥ DCAT
https://docs.ckan.org/projects/ckanext-dcat
165 stars 145 forks source link

Interface for `requests` sessions #98

Closed metaodi closed 6 years ago

metaodi commented 6 years ago

For a client, I need to perform HTTP requests using a client certificate. This is something that the requests library supports, so I was thinking how we could implement that.

I propose to start using requests Session objects to make the remote HTTP calls. Then we could provide a new method on the IDCATRDFHarvester interface called e.g. update_session() which would receive an "empty" session object (or the session object changed by the last implementation of update_session() for subsequent calls).

This would enable us to write extensions that implement this interface, where each could update something in the session object, which then gets used to make the remote calls.

metaodi commented 6 years ago

See #99 for a first draft of this idea.