aboutsummaryrefslogblamecommitdiff
path: root/src/garage/tests/k2v/mod.rs
blob: a009460e9673c5c5a8625f32d7b895a4a0b768fd (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
















                                                                  
pub mod batch;
pub mod errorcodes;
pub mod item;
pub mod poll;
pub mod simple;

use hyper::{Body, Response};

pub async fn json_body(res: Response<Body>) -> serde_json::Value {
	let res_body: serde_json::Value = serde_json::from_slice(
		&hyper::body::to_bytes(res.into_body())
			.await
			.unwrap()
			.to_vec()[..],
	)
	.unwrap();
	res_body
}