I have some code like the following:
using (var client = new HttpClient())
{
client.Timeout = TimeSpan.FromMilliseconds(3000);
var request = new HttpRequestMessage(HttpMethod.Head, myURI);
var response = await client.SendAsync(request);
}
But when I go into the debugger, the code just hangs on await client.SendAsync(...). It throws no exception, and the control does not continue. It hangs indefinitely. Does anyone know what I am doirn wrong?