-
-
Notifications
You must be signed in to change notification settings - Fork 365
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
Fix signal handling for Request objects #613
Fix signal handling for Request objects #613
Conversation
Fix lint issues
c35a570
to
0f28364
Compare
Thanks for working on this. This needs a test. |
I also don't think we should have ad-hoc handling for each property of |
I totally agree with this. Is there something similar in place I could reference? |
That's why we normalize them here with The only special cases I can think of that are not handled naturally by that normalization are:
There isn't much that these cases have in common. But if anyone can think of a cleaner way to do all of this, I'd love to see it! In this particular case with |
I updated the code to use the simpler approach that I mentioned. PTAL. Once a test is added, this should be good to go. |
d3e23ff
to
fe37f60
Compare
Currently, ky ignores
AbortSignal
when it's provided as part of aRequest
object.This PR modifies the
Ky
class to properly extract and respect theAbortSignal
fromRequest
objects. It ensures that signals are handled consistently whether they're provided directly in the options or as part of aRequest
object.