feat: Support for bring-your-own HTTP client #596
Draft
+556
−36
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The
HTTPConnectortrait inobject_storeallows for users to define arbitrary HTTP client providers. This allows us to expose a Python API that users can implement to override how HTTP requests are handled.This gives total visibility into the HTTP requests that obstore is making.
This PR also defines an HTTP client backed by aiohttp.
Todo
impl<'py> FromPyObject<'_, 'py> for PyHeaderMap {close_all()from the connector?Is it possible to use
yield, to allow Python to manage when to close the connection?