Skip to content
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

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.

@tmenier tmenier added this to Backlog in Default Project via automation Jun 10, 2022
@tmenier tmenier moved this from Backlog to In Progress in Default Project Jun 10, 2022
tmenier added a commit that referenced this issue Jun 10, 2022
@tmenier tmenier moved this from In Progress to Ready in Default Project Jun 10, 2022
@tmenier tmenier moved this from Ready to In Prerelease in Default Project Jun 20, 2022
@tmenier tmenier moved this from In Prerelease to Released in Default Project Dec 14, 2023
@tmenier tmenier closed this as completed Dec 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Default Project
  
Released
Development

No branches or pull requests

1 participant