-
Notifications
You must be signed in to change notification settings - Fork 116
Description
Describe the bug
When trying to implement a custom HttpConnector, one needs to implement HttpService. That service needs to operate on HttpRequest, whose type of body is HttpRequestBody.
The implementation of HttpRequestBody is an enum with either a single or multiple buffers:
arrow-rs-object-store/src/client/http/body.rs
Lines 111 to 112 in 12ef9bc
| Bytes(Bytes), | |
| PutPayload(usize, PutPayload), |
But the public API of HttpRequestBody presents no way to access the PutPayload variant. There's an as_bytes public method, but that returns None for Inner::PutPayload.
To Reproduce
(maybe this is a feature request instead of a bug report?)
Expected behavior
Should be able to access all internal variants through the public API.
Additional context
I'm prototyping integrating the HttpConnector into obstore — Python bindings to object_store — so that someone can define an arbitrary Python-based HTTP client to make the requests initiated by object_store.