req = (HttpWebRequest) WebRequest.Create(get_url);
req.Timeout = 1500;
resp = (HttpWebResponse) req.GetResponse();
sr = new StreamReader(resp.GetResponseStream(), Encoding.GetEncoding("utf-8"));
content = sr.ReadToEnd();
sr.Close();
async Task<string> SendRequestUntilSuccess(string url)
{
try
{
HttpResponseMessage response = await client.GetAsync(url);
response.EnsureSuccessStatusCode();
return response.Content.ReadAsStringAsync();
}
catch(HttpRequestException e)
{
return SendRequestUntilSuccess(url);
}
}