Any Non-Obsolete Mechanism for Async Requests?

97 views
Skip to first unread message

Siavash Mortazavi

unread,
Jul 30, 2021, 4:24:30 PM7/30/21
to RestSharp
Hi,

I'm looking for RestSharp's async mechanism for submitting requests. 

By browsing the source code, I realized all the related implementation methods are in \src\RestSharp\Legacy\RestClient.cs and are marked as:
[Obsolete("This method will be removed soon in favour of the proper async call")]

The weird thing is IRestClient.ExecuteAsync() and all of its flavors are not marked as obsolete, and the implementations in \src\RestSharp\RestClient.Async.cs are also not obsolete, but the method in  RestClient.Async.cs file with this signature:
 public Task<IRestResponse> ExecuteAsync(IRestRequest request, CancellationToken token = default)

makes an internal call to one of the obsolete legacy methods.

So, may I know what's the (new) proper way for making async requests in RestSharp?

Thank you so much. 
Cheers,
Sia 

Alexey Zimarev

unread,
Oct 31, 2021, 5:01:51 AM10/31/21
to RestSharp
GetAsync, PostAsync, etc

Siavash Mortazavi

unread,
Nov 2, 2021, 11:24:14 PM11/2/21
to rest...@googlegroups.com
Thanks for the answer 👍👌

--
You received this message because you are subscribed to a topic in the Google Groups "RestSharp" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/restsharp/zp78EI5TD2s/unsubscribe.
To unsubscribe from this group and all its topics, send an email to restsharp+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/restsharp/0825939c-ffdb-4352-9856-4fb0f4824b4bn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages