Skip to content

Update example-reqwest-response #2430

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

Conversation

gerardcl
Copy link
Contributor

@gerardcl gerardcl commented Dec 16, 2023

Motivation

Related to #2356
Fixes #2429

Solution

Starting to use axum on my projects, and I decided to contribute with an easy fix for the example reqwest-response, since it is a fix similar to what I am using.

The idea of this fix is to avoid the mismatch on http crate from both axum and reqwest crates.
Basically, the main issue is on the headers struct, which I am just remapping to fit into the response builder.

I am not sure if there is a plan to wait for the reqwest to update its dependencies, but in the meantime I think this is a nice and clean fix to avoid having huge commented code snippets.

I hope it makes sense to you!

Thanks!!!

@davidpdrsn davidpdrsn changed the title Fixes: #2429 Update example-reqwest-response Dec 17, 2023
@gerardcl gerardcl force-pushed the gerardcl/enable-back-example-reqwest-response branch from f4c9ae9 to 2e7ac83 Compare December 17, 2023 11:42
@gerardcl gerardcl requested a review from davidpdrsn December 17, 2023 11:42
@gerardcl
Copy link
Contributor Author

@davidpdrsn did update as per your last comment, thanks!
let me know if you need anything else to be updated, i.e. docs, related to this change

Copy link
Member

@davidpdrsn davidpdrsn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@davidpdrsn davidpdrsn merged commit 12676aa into tokio-rs:main Dec 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enable example reqwest-response back
2 participants