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 to hyper 1 #55

Merged
merged 2 commits into from
Aug 6, 2024
Merged

Conversation

tottoto
Copy link
Contributor

@tottoto tottoto commented Aug 6, 2024

Updates the hyper example to use hyper 1.


use hyper::body::{Body as HttpBody, Bytes, Frame};

pub enum Body {
Copy link
Owner

Choose a reason for hiding this comment

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

Can we use hyper_body_util::Full<Bytes> for the body type instead? This code is a little distracting from the main router code.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Can we use hyper_body_util::Full for the body type instead?

Yes. The easy way is just using http_body_util::Full<Bytes>, to describe empty body, using Full::default constructor.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated.

@ibraheemdev
Copy link
Owner

Thanks!

@ibraheemdev ibraheemdev merged commit 386459e into ibraheemdev:master Aug 6, 2024
5 checks passed
@tottoto tottoto deleted the update-to-hyper-1 branch August 6, 2024 15:08
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.

2 participants