Migration to EF and starting to add Identity #11
@ -36,12 +36,20 @@ public class HtmlPageReader
|
||||
private string ReadSiteContent(string url)
|
||||
{
|
||||
using var client = new HttpClient();
|
||||
try
|
||||
{
|
||||
var html = client.GetStringAsync(url);
|
||||
html.Wait();
|
||||
|
||||
var content = html.Result;
|
||||
return content;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine($"Failed to connect to '{url}'. {ex.Message}");
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
public string GetSiteContent()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user