Skip to content

Commit

Permalink
Merge branch '2.0' into new-tx-failure
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex6323 authored Oct 30, 2023
2 parents cd6b814 + 3f1dc46 commit 727e287
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sdk/src/client/node_manager/http_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Response> {
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
}
Expand All @@ -114,7 +114,7 @@ impl HttpClient {
pub(crate) async fn post_bytes(&self, node: Node, timeout: Duration, body: &[u8]) -> Result<Response> {
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
}
}

0 comments on commit 727e287

Please sign in to comment.