diff --git a/exe-unit/components/gsb-http-proxy/Cargo.toml b/exe-unit/components/gsb-http-proxy/Cargo.toml index 26fc57db4..812d35ead 100644 --- a/exe-unit/components/gsb-http-proxy/Cargo.toml +++ b/exe-unit/components/gsb-http-proxy/Cargo.toml @@ -31,6 +31,7 @@ log = { version = "0.4", features = [] } rand = { workspace = true } reqwest = { version = "0.11", features = ["json", "stream"] } serde = { version = "1.0", features = ["derive"] } +serde_bytes = "0.11.3" serde_derive = "1.0" serde_json = "1.0" thiserror = "1.0" diff --git a/exe-unit/components/gsb-http-proxy/src/message.rs b/exe-unit/components/gsb-http-proxy/src/message.rs index 322d41558..43e0e86a9 100644 --- a/exe-unit/components/gsb-http-proxy/src/message.rs +++ b/exe-unit/components/gsb-http-proxy/src/message.rs @@ -13,6 +13,7 @@ use ya_service_bus::{RpcMessage, RpcStreamMessage}; pub struct GsbHttpCallMessage { pub method: String, pub path: String, + #[serde(with = "serde_bytes")] pub body: Option>, pub headers: HashMap>, } diff --git a/exe-unit/components/gsb-http-proxy/src/response.rs b/exe-unit/components/gsb-http-proxy/src/response.rs index 4debee6be..494f491cd 100644 --- a/exe-unit/components/gsb-http-proxy/src/response.rs +++ b/exe-unit/components/gsb-http-proxy/src/response.rs @@ -22,6 +22,7 @@ pub struct GsbHttpCallResponseHeader { #[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)] pub struct GsbHttpCallResponseBody { + #[serde(with = "serde_bytes")] pub msg_bytes: Vec, }