http_request/common/struct.rs
1use super::*;
2
3/// HTTP request body content.
4///
5/// Holds the raw bytes of the request body. Use [`RequestBuilder::body`] /
6/// [`RequestBuilder::body_json`] / [`RequestBuilder::body_text`] on the builder
7/// to populate; users normally do not construct `Body` directly.
8///
9/// `Body` is intentionally a single-value type (`Vec<u8>`) to match the
10/// `Request` / `Response` design in `hyperlane-core` — see
11/// `hyperlane-standards §8.1`. Higher-level framing (json vs text vs binary)
12/// lives in the builder, not in the data type.
13#[derive(Clone, Debug, Default, Eq, Getter, PartialEq, Serialize)]
14pub struct Body {
15 /// Raw body bytes.
16 pub bytes: Vec<u8>,
17}