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

Provide a HttpHeaders class for platform-independent use #4

Closed
stevenroose opened this issue Feb 26, 2015 · 2 comments
Closed

Provide a HttpHeaders class for platform-independent use #4

stevenroose opened this issue Feb 26, 2015 · 2 comments

Comments

@stevenroose
Copy link

The dart:io.HttpHeaders actually belongs in this library.

I'd prefer at least to have it available here as well, so that there is one available for platform-independent development.

@stevenroose
Copy link
Author

Same goes for HttpStatus and ContentType

@nex3
Copy link
Member

nex3 commented Feb 26, 2015

I'm not a fan of providing giant enums for string-based values like these. I find it rarely provides value on top of just writing the strings yourself, while producing a lot of API overhead and making the code harder to read. I understand the argument that they provide better static checking, but I think constants should be used for improving the readability of the code and correctness should generally be left to the tests, and constants here don't help the readability.

I will point out that http_parser has a cross-platform MediaType class that's used by this package.

@nex3 nex3 closed this as completed Feb 26, 2015
natebosch pushed a commit that referenced this issue Apr 13, 2021
* Remove usage of upper-case constants.

* update SDK version
* remove stable from Travis config
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

2 participants