public async Task GetResponseAsStringAsync(HttpWebRequest webRequest, string post = null) { if (post != null) { webRequest.Method = "POST"; using (Stream postStream = await webRequest.GetRequestStreamAsync()) { byte[] postBytes = Encoding.ASCII.GetBytes(post); await postStream.WriteAsync(postBytes, 0, postBytes.Length); await postStream.FlushAsync(); } } try { Task Response; using (var response = (HttpWebResponse)await webRequest.GetResponseAsync()) using (Stream streamResponse = response.GetResponseStream()) using (StreamReader streamReader = new StreamReader(streamResponse)) { Response = streamReader.ReadToEndAsync(); } // Ignore Warning: I don't want to await for this call, its for logging Response.ContinueWith(async x => { _logger.Info(new HttpRequestLog { Request = webRequest, Url = webRequest.RequestUri.ToString(), Method = webRequest.Method, PostBody = post, Response = await x }); }); return await Response; } catch (Exception ee) { _logger.Error(new HttpErrorLog { Request = webRequest, Url = webRequest.RequestUri.ToString(), ExceptionMessage = ee.ToString(), PostBody = post }); return null; } }