datalust / seq-api

HTTP API client for Seq
https://datalust.co/seq
Apache License 2.0
78 stars 21 forks source link

Support Cancellation of Request #12

Closed bbrandt closed 5 years ago

bbrandt commented 8 years ago

We should pass a CancellationToken through to the HttpClient's SendAsync() method. Who do you think should own the CancellationToken, or where should it originate?

Some options:

If we intend the library to eventually support concurrent operations, then option 1 is the only logical choice. If we think the library will always be intended for single-threaded use, then maybe the last option is OK.

nblumhardt commented 8 years ago

I think now we've set off down the concurrent-use path, option 1 does seem to make the most sense. Using a defaulted parameter might work and keep the proliferation of methods under control...

bbrandt commented 8 years ago

I'm good with that.

nblumhardt commented 5 years ago

This is included v5 of the API client.