I have an httpclient like this:
var client = new HttpClient();
I am writing to you like this:
var result = client.PostAsync( endpointUri, requestContent);
And get an answer like this:
HttpResponseMessage response = result.Result;
I understand that this call blocks the thread, this is how it should work (just creating a tool for yourself, no need for asynchronous threads)
The first time I run this call, it takes about 2 minutes to get the result. Meanwhile, if I make the same call elsewhere, it will be done in 200 ms. Even if I hit Google, it will take 2 minutes. But, after the first call, while I open the application, any additional calls are good. Its just the first feces when I open the app. What could be the reason for this?
Zach
source share