From 1d394684dde1c85915fd71133815122b0c2b7bdb Mon Sep 17 00:00:00 2001 From: Thibault Martinez Date: Sun, 29 Oct 2023 20:52:49 +0100 Subject: [PATCH] Update application/vnd.iota.serializer-v1 to v2 --- sdk/src/client/node_manager/http_client.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sdk/src/client/node_manager/http_client.rs b/sdk/src/client/node_manager/http_client.rs index 409290adab..cd2b3e376c 100644 --- a/sdk/src/client/node_manager/http_client.rs +++ b/sdk/src/client/node_manager/http_client.rs @@ -96,11 +96,11 @@ impl HttpClient { Self::parse_response(resp, &node.url).await } - // Get with header: "accept", "application/vnd.iota.serializer-v1" + // Get with header: "accept", "application/vnd.iota.serializer-v2" pub(crate) async fn get_bytes(&self, node: Node, timeout: Duration) -> Result { let mut request_builder = self.client.get(node.url.clone()); request_builder = self.build_request(request_builder, &node, timeout); - request_builder = request_builder.header("accept", "application/vnd.iota.serializer-v1"); + request_builder = request_builder.header("accept", "application/vnd.iota.serializer-v2"); let resp = request_builder.send().await?; Self::parse_response(resp, &node.url).await } @@ -114,7 +114,7 @@ impl HttpClient { pub(crate) async fn post_bytes(&self, node: Node, timeout: Duration, body: &[u8]) -> Result { let mut request_builder = self.client.post(node.url.clone()); request_builder = self.build_request(request_builder, &node, timeout); - request_builder = request_builder.header("Content-Type", "application/vnd.iota.serializer-v1"); + request_builder = request_builder.header("Content-Type", "application/vnd.iota.serializer-v2"); Self::parse_response(request_builder.body(body.to_vec()).send().await?, &node.url).await } }