diff options
Diffstat (limited to 'src/api/k2v')
-rw-r--r-- | src/api/k2v/item.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/api/k2v/item.rs b/src/api/k2v/item.rs index e13a0f30..33f4da53 100644 --- a/src/api/k2v/item.rs +++ b/src/api/k2v/item.rs @@ -3,7 +3,7 @@ use std::sync::Arc; use base64::prelude::*; use http::header; -use hyper::{Body, Request, Response, StatusCode}; +use hyper::{body::HttpBody, Body, Request, Response, StatusCode}; use garage_util::data::*; @@ -137,7 +137,8 @@ pub async fn handle_insert_item( .map(CausalContext::parse_helper) .transpose()?; - let body = hyper::body::to_bytes(req.into_body()).await?; + let body = req.into_body().collect().await?.to_bytes(); + let value = DvvsValue::Value(body.to_vec()); garage |