I have some problem with async method.
public async void MakePost()
{
var cookieArray = GetCookies().Result;
(...)
}
async public Task<string[]> GetCookies()
{
(...)
var response = await httpClient.SendAsync(request);
string cookieTempSession = response.Headers.ToString();
(...)
return cookieArray;
}
Nothing happening after var response = await httpClient.SendAsync(request);
I put breakpoint in next line string cookieTempSession = response.Headers.ToString();
but it never reach it. I tried to "try catch" but also nothing happend. When I merge this two methods into one it works perfect but it's not so pretty. I just wondering what happened there.