diff --git a/Cargo.lock b/Cargo.lock index c9b3092b9..820fe1fb7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -9250,6 +9250,7 @@ dependencies = [ "rand 0.8.5", "reqwest", "serde", + "serde_bytes", "serde_derive", "serde_json", "serial_test 0.5.1 (git+https://github.com/tworec/serial_test.git?branch=actix_rt_test)", 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..c6c5276ee 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>, } @@ -28,6 +29,7 @@ impl RpcMessage for GsbHttpCallMessage { pub struct GsbHttpCallStreamingMessage { 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, }