I am consuming one REST API (GET) using .Net HttpClient. I want to call this API with long polling.
I have few questions:
- What is the best way to retrieve data using long polling?
- Here is my use case - my application will consume this api with long polling and based on results I will perform some operation on different thread. Based on new response of long poll get, I will abort/complete old thread and start operation on new thread again. How to achieve this using Tasks?
For the first question I've found this solution, works pretty well: