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:
|
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.
Describe the bug
When trying to implement a custom
HttpConnector, one needs to implementHttpService. That service needs to operate onHttpRequest, whose type of body isHttpRequestBody.The implementation of
HttpRequestBodyis an enum with either a single or multiple buffers:arrow-rs-object-store/src/client/http/body.rs
Lines 111 to 112 in 12ef9bc
But the public API of
HttpRequestBodypresents no way to access thePutPayloadvariant. There's anas_bytespublic method, but that returnsNoneforInner::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
HttpConnectorintoobstore— Python bindings toobject_store— so that someone can define an arbitrary Python-based HTTP client to make the requests initiated byobject_store.