I have a http request in my asp.net 4.0 application. I would like for the thread to wait before it continues on.
HttpClient client = new HttpClient();
HttpResponseMessage responseMsg = client.GetAsync(requesturl).Result;
// I would like to wait till complete.
responseMsg.EnsureSuccessStatusCode();
Task<string> responseBody = responseMsg.Content.ReadAsStringAsync();
Call .Wait() on the responseBody Task