Files
codex-proxy-rs/backend/tests/support/http.rs
T
2026-07-01 17:13:00 +08:00

7 lines
241 B
Rust

use axum::body::to_bytes;
pub(crate) async fn response_json(response: axum::response::Response) -> serde_json::Value {
let bytes = to_bytes(response.into_body(), usize::MAX).await.unwrap();
serde_json::from_slice(&bytes).unwrap()
}