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 ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #625 +/- ##
==========================================
+ Coverage 77.83% 79.47% +1.64%
==========================================
Files 47 54 +7
Lines 4286 5346 +1060
Branches 611 675 +64
==========================================
+ Hits 3336 4249 +913
- Misses 933 1078 +145
- Partials 17 19 +2 ☔ 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. |
pi0
left a comment
There was a problem hiding this comment.
Thanks!
(in summary made refactors to improve maintainability + relax types to only hint and still allow artibrary string/number as input)
|
Glad I can help! |
🔗 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/jpgis 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