I have the following implementation. I was getting an timeout exception after 100 seconds. And I have added 10 minutes to httpclient as follows, but I am still getting the same error message.
using (var httpClient = new HttpClient(new HttpClientHandler()))
{
httpClient.Timeout = TimeSpan.FromMinutes(10);
var request = new HttpRequestMessage(method, requestUri);
if (body != string.Empty)
{
request.Content = new StringContent(body, Encoding.UTF8, "application/json");
}
try
{
using (var response = httpClient.SendAsync(request).Result)
{
}
catch (Exception ex)
{
}
}
}