-
-
Notifications
You must be signed in to change notification settings - Fork 388
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
FlurlResponse Get_Async methods don't accept CancellationToken #711
Comments
@tmenier - Happy to implement this as it looks pretty straight forward? Just tell me which branch to start from. |
Yeah, this looks like an oversight. Pretty trivial enhancement, I'll get it out with the next 4.0 prerelease. |
Sorry for the long delay. It turns out this wasn't an oversight. Flurl relies on async methods off |
You could use conditionally compiled extension methods to get CancellationToken support for this methods in older runtimes. Examples: edit: Ok, I just noticed that those HttpContent extension methods do not actually use the CancellationToken except for a check before requesting the content. So those are not really a good solution. |
Please describe the feature/enhancement in as much detail as possible.
CancellationToken is accepted on some async methods.
While I haven't audited the code base, the class I care about currently is FlurlResponse and methods such as:
The underlying calls to HttpResponseMessage.Content.ReadAsStreamAsync() supports CancellationTokens, FlurlResponse should too
The text was updated successfully, but these errors were encountered: