Flurl
Flurl copied to clipboard
Move CancellationToken to last arg (after HttpCompletionOption) of all HTTP-sending methods
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
.