-
Notifications
You must be signed in to change notification settings - Fork 179
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
feat(headers): intellisense overhaul #625
base: main
Are you sure you want to change the base?
Conversation
Marking this as draft as this is very early in development. I will gradually add everything I can, but it will take a good while. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #625 +/- ##
==========================================
+ Coverage 77.83% 78.72% +0.88%
==========================================
Files 47 56 +9
Lines 4286 5433 +1147
Branches 611 684 +73
==========================================
+ Hits 3336 4277 +941
- Misses 933 1135 +202
- Partials 17 21 +4 β View full report in Codecov by Sentry. |
I believe this has covered everything in the scope of the PR. If I missed anything in any other function where it can be improved, please let me know and I'll gladly add it. There are a few things I would like to change, like the AnyType usage, but I do need a tiny bit of help in figuring out how to properly take care of multi-value parameter-included headers (like www-authenticate), especially when used inside strings as that could probably mitigate the use of AnyType entirely. That being said, I understand it can't be full-proof, and therefore I think this is good as a baseline intellisense. |
π Linked issue
β Type of change
π Description
This PR is something I thought about for a while. Since we have header intellisense, we might as well have value intellisense. This will ensure no wrong header values are set and would save time debugging header issues (a common example of this is the misconception that
image/jpg
is a valid content type, when in reality it doesn't have a universally acceptable type). Granted, this won't be a complete intellisense for all possible values as the value combinations can be endless, however it would give a good foundation.EDIT: As of today, I have decided to expand this further and include status codes (maybe something else as well)
π Checklist