test(core): assert forked spawn request prefix stability

This commit is contained in:
Friel
2026-04-01 05:39:35 +00:00
parent dedd1c386a
commit 28c2367c0a
2 changed files with 69 additions and 20 deletions

View File

@@ -103,14 +103,18 @@ fn decode_body_bytes(body: &[u8], content_encoding: Option<&str>) -> Vec<u8> {
impl ResponsesRequest {
pub fn body_json(&self) -> Value {
let body = decode_body_bytes(
let body = self.decoded_body_bytes();
serde_json::from_slice(&body).unwrap()
}
pub fn decoded_body_bytes(&self) -> Vec<u8> {
decode_body_bytes(
&self.0.body,
self.0
.headers
.get("content-encoding")
.and_then(|value| value.to_str().ok()),
);
serde_json::from_slice(&body).unwrap()
)
}
pub fn body_bytes(&self) -> Vec<u8> {