0 votes
by (150 points)

Hi, I’m starting my evaluation today. Is there any implementation to call download/upload asynchronously using Rebex.Net.WebClient?

I'm currently wrapping those synchronous call using Task.Run. AFAIK, exposing a method that is truly synchronous using an asynchronous API is considered a bad practice.

Thank you.

Applies to: Rebex HTTPS

1 Answer

0 votes
by (70.2k points)
selected by
 
Best answer

Hello,

Unfortunately, the Rebex.Net.WebClient has no asynchronous methods. It is replacement for the System.Net.WebClient, which has EAP (event-async-pattern), which has been obsoleted.
We want to add some true-asynchronous API to our WebClient, but we have no schedule for it yet.

Although async-over-sync is not good practice as you correctly mentioned, it is suggested solution in case you need to perform the operation asynchronously to free the current thread.

Actually, the async API for HttpRequest class is currently async-over-sync. We have plan to make it true-async.

...