Closed
Description
Is your feature request related to a problem? Please describe.
ElasticSearch supports cbor
format, and it would be useful it given the smaller overhead over json and that in Rust the decoder is available and also a serde Serializer/Deserializer. However, in order to receive and decode cbor
data, it is necessary to get the raw data from Response.
Describe the solution you'd like
Add the following to Response
:
pub async fn bytes(self) -> Result<Bytes, ClientError>
{
let bytes = self.0.bytes().await?;
Ok(bytes)
}
Where Bytes
is from the bytes
crate as returned from reqwest
.