-
-
Notifications
You must be signed in to change notification settings - Fork 312
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
Provide CancellationToken as optional parameter to all methods, so requests can be cancelled or timed-out. #238
Comments
Good idea! In your mind, how would this look? An overload for each function on a service, making them all accept an optional token? public List<Something> ListAsync(ListOptions options, CancellationToken token = null)
{
...
} |
yes, any method that results in an HttpRequest could accept an optional token. |
Any traction on this? This could be very helpful in my current use-cases. IMO It would also be useful to update the |
I’m still open to this! If anyone has the time I’d be happy to review a pull request to get this added in. |
Alright, I can take a stab at this, standby |
PR posted: #476 |
Published in 5.1.0 🚀 |
It is common for APIs involving potentially long http requests, to accept a
CancellationToken
, such that a call can be cancelled, or timed-out by a user.It would be fairly simple to add to this API, as it would be just need be passed down to the
HttpClient
, that accepts one inSendAsync
.The text was updated successfully, but these errors were encountered: