kylebarron opened a new issue, #558:
URL: https://github.com/apache/arrow-rs-object-store/issues/558

   **Describe the bug**
   
   When trying to implement a custom 
[`HttpConnector`](https://docs.rs/object_store/latest/object_store/client/trait.HttpConnector.html),
 one needs to implement 
[`HttpService`](https://docs.rs/object_store/latest/object_store/client/trait.HttpService.html).
 That service needs to operate on 
[`HttpRequest`](https://docs.rs/object_store/latest/object_store/client/type.HttpRequest.html),
 whose type of body is 
[`HttpRequestBody`](https://docs.rs/object_store/latest/object_store/client/struct.HttpRequestBody.html).
 
   
   The implementation of `HttpRequestBody` is an enum with either a single or 
multiple buffers:
   
   
https://github.com/apache/arrow-rs-object-store/blob/12ef9bc22c56228b25f3b56a78879e9a45a07fc4/src/client/http/body.rs#L111-L112
   
   But the public API of `HttpRequestBody` presents no way to access the 
`PutPayload` variant. There's an 
[`as_bytes`](https://docs.rs/object_store/latest/object_store/client/struct.HttpRequestBody.html#method.as_bytes)
 public method, but that returns `None` for `Inner::PutPayload`.
   
   **To Reproduce**
   
   
   **Expected behavior**
   
   Should be able to access all internal variants through the public API.
   
   **Additional context**
   
   I'm [prototyping](https://github.com/developmentseed/obstore/pull/596) 
integrating the 
[`HttpConnector`](https://docs.rs/object_store/latest/object_store/client/trait.HttpConnector.html)
 into [`obstore`](https://github.com/developmentseed/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`.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to