firely-net-sdk icon indicating copy to clipboard operation
firely-net-sdk copied to clipboard

Async operations on FhirClient to take a CancellationToken that is can pass to any web requests it makes

Open brianpos opened this issue 2 years ago • 5 comments

Is your feature request related to a problem? Please describe. When performing async requests the ability to provide a cancellation token will assist in permitting cancelling the requests - such as those to a web api - when a call is cancelled. Very useful in terminology validations or resolving resources which may be cancelled too.

Describe the solution you'd like Include the CancellationToken to any async FhirClient calls, and use that on any web/directory async calls it makes.

Additional context Server validations, client validations, or any other async general requests performed. I would like this on the ResourceResolver interfaces too, but can do that seperately.

brianpos avatar Mar 26 '22 03:03 brianpos

I was asking exactly the same thing. Votes++

holpit avatar Apr 08 '22 15:04 holpit

I think we can add this to the FhirClient by overloading methods with the parameter CancellationToken. In that way we don't break the code.

marcovisserFurore avatar Apr 14 '22 14:04 marcovisserFurore

I was going to add it in with an optional parameter with a default value, does that still count as a non-breaking change (have started the work)

brianpos avatar Apr 15 '22 22:04 brianpos

Yes, adding an optional param counts as a non-breaking change (for us ;-)

ewoutkramer avatar Apr 19 '22 11:04 ewoutkramer

We basically strive for updates that won't produce errors when you need to recompile your software when you upgrade the SDK package. So, not necessarily binary compatibility.

ewoutkramer avatar Apr 19 '22 11:04 ewoutkramer

Anything being done on this? If not do you take outside prs?

JockeM avatar Nov 08 '22 22:11 JockeM

I'll check where my code got to.

brianpos avatar Nov 08 '22 22:11 brianpos

Could anyone confirm if cancellation support was added to one of the latest releases?

aignatovich avatar Jan 03 '23 23:01 aignatovich

Not as far as I know.

brianpos avatar Jan 04 '23 02:01 brianpos

Sorry, in some way it lost our attention. We try to add it to the next release (5.0), which is planned for next month (February 2023).

marcovisserFurore avatar Jan 04 '23 08:01 marcovisserFurore

Done.

ewoutkramer avatar Jul 19 '23 14:07 ewoutkramer