mirror of
https://github.com/zyycn/codex-proxy-rs.git
synced 2026-11-06 16:06:08 +00:00
7 lines
241 B
Rust
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()
|
|
}
|