Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Move CancellationToken to last arg (after HttpCompletionOption) of all HTTP-sending methods #702

Closed
tmenier opened this issue Jun 10, 2022 · 0 comments

Comments

@tmenier
Copy link
Owner

tmenier commented Jun 10, 2022

This one's long overdue. It is considered a best practice for methods that support cancellation to specify CancellationToken as the last argument, and developers have come to expect it. At one point long ago, Flurl's HTTP-sending methods were enhanced to support an optional HttpCompletionOption, and in order for this not to be a breaking change, it was added to the end of these methods, leaving CancellationToken in the middle.

But major-version updates are the time to right such wrongs, even if it break things. Hopefully making this change in 4.0 won't cause people significant pains. Affected methods include all "core" and extension methods fitting the pattern SendAsync, Send{ContentType}Async}, {Verb}Async, or {Verb}{ContentType}Async.

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
Status: Released
Development

No branches or pull requests

1 participant