I am developing a .net application using RestSharp.RestClient (105.2.4-rc4-24214-01). I have installed
RestClient.Timeout=1
or
RestClient.Timeout=10000
and then call my test API
var tcs = new TaskCompletionSource<IRestResponse>(); RestClient.ExecuteAsync(request, response => { tcs.SetResult(response); }) return tcs.Task.Result;
But it still uses the default value of 100000 and generates "The task was canceled." exception only after 100000 ms.
How can I change this value?
source share