private static async Task <HttpResponseMessage> MakeSiteRequest(UrlTransform t, bool AllowAutoRedirect) { var handler = new HttpClientHandler() { AllowAutoRedirect = AllowAutoRedirect, }; using (var client = new HttpClient(handler)) { client.BaseAddress = new Uri("http://mubaloo.com/"); //client.DefaultRequestHeaders.Accept.Clear(); //client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json")); // New code: return(await client.GetAsync(t.OldUrl)); } }
private static async Task<HttpResponseMessage> MakeSiteRequest(UrlTransform t, bool AllowAutoRedirect) { var handler = new HttpClientHandler() { AllowAutoRedirect = AllowAutoRedirect, }; using (var client = new HttpClient(handler)) { client.BaseAddress = new Uri("http://mubaloo.com/"); //client.DefaultRequestHeaders.Accept.Clear(); //client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json")); // New code: return (await client.GetAsync(t.OldUrl)); } }