Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update application/vnd.iota.serializer-v1 to v2 #1497

Closed
Thoralf-M opened this issue Oct 24, 2023 · 1 comment · Fixed by #1527
Closed

Update application/vnd.iota.serializer-v1 to v2 #1497

Thoralf-M opened this issue Oct 24, 2023 · 1 comment · Fixed by #1527
Labels
good-first-issue Good first issue m-client Module - Client

Comments

@Thoralf-M
Copy link
Member

Description

Update application/vnd.iota.serializer-v1 to v2

// Get with header: "accept", "application/vnd.iota.serializer-v1"
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");
let resp = request_builder.send().await?;
Self::parse_response(resp, &node.url).await
}
pub(crate) async fn post_json(&self, node: Node, timeout: Duration, json: Value) -> Result<Response> {
let mut request_builder = self.client.post(node.url.clone());
request_builder = self.build_request(request_builder, &node, timeout);
Self::parse_response(request_builder.json(&json).send().await?, &node.url).await
}
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");
(note: should be done only for the 2.0 branch)

Are you planning to do it yourself in a pull request?

No.

@Thoralf-M Thoralf-M added m-client Module - Client good-first-issue Good first issue labels Oct 24, 2023
@Thoralf-M Thoralf-M added this to the v2.0.0 milestone Oct 24, 2023
@github-project-automation github-project-automation bot moved this to Product Backlog in iota-sdk Oct 24, 2023
@thibault-martinez thibault-martinez linked a pull request Oct 29, 2023 that will close this issue
@thibault-martinez
Copy link
Member

Closed by #1527

@github-project-automation github-project-automation bot moved this from Product Backlog to Done in iota-sdk Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good-first-issue Good first issue m-client Module - Client
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants