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

Why Response::new takes an u16 instead of http::StatusCode? #381

Closed
oxalica opened this issue Dec 22, 2019 · 2 comments
Closed

Why Response::new takes an u16 instead of http::StatusCode? #381

oxalica opened this issue Dec 22, 2019 · 2 comments

Comments

@oxalica
Copy link

oxalica commented Dec 22, 2019

It makes it hard to use StatusCode::OK or StatusCode::NOT_FOUNT for semantic coding.

Note that Response::status and Response::set_status are using StatusCode.
The new method is quite an inconsistency.

@emmanuelantony2000
Copy link

I want to start contributing to tide. Should I change the new function in order to maintain consistency?

@jbr
Copy link
Member

jbr commented Mar 29, 2020

This is addressed by #414

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

No branches or pull requests

4 participants