Skip to content

Commit

Permalink
Use serde_bytes for GsbHttpProxy Message and Response
Browse files Browse the repository at this point in the history
  • Loading branch information
mwalkiewicz committed Oct 3, 2024
1 parent 5f8be31 commit 2dbcc79
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions exe-unit/components/gsb-http-proxy/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions exe-unit/components/gsb-http-proxy/src/message.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Vec<u8>>,
pub headers: HashMap<String, Vec<String>>,
}
Expand Down
1 change: 1 addition & 0 deletions exe-unit/components/gsb-http-proxy/src/response.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<u8>,
}

Expand Down

0 comments on commit 2dbcc79

Please sign in to comment.