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

Separate Request and Response header constants #12

Open
thlib opened this issue Oct 18, 2020 · 2 comments
Open

Separate Request and Response header constants #12

thlib opened this issue Oct 18, 2020 · 2 comments

Comments

@thlib
Copy link

thlib commented Oct 18, 2020

This is not really an issue, more a comment on why I ended up not using this library.

I want the constants to help me avoid mistakes, one of these mistakes is using a Request header in a Response request or vice versa, since all the headers are joined in one class this prevents me from being able to do that.

I prefer the way that mozilla suggests to organize headers RequestHeader, ResponseHeader and GenericHeader (Though I'd just repeat Generic in Request and Response)
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers

@OndraM
Copy link
Member

OndraM commented Nov 2, 2020

Hi, this definitely makes sense and I'm for this change. To provide upgrade path, all constants in Header could be kept, but those which are also in Request or Response would be marked as deprecated.

@timohuovinen Are you interested in making this happen?

@OndraM OndraM changed the title Just a comment Separate Request and Response header constants Nov 2, 2020
@andrey-helldar
Copy link

I do :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants