I would like to know how I can access a page, example uol.com.br, and return your HTML. For together like this return try to use regular expressions with this HTML.
I would like to know how I can access a page, example uol.com.br, and return your HTML. For together like this return try to use regular expressions with this HTML.
private async void GetHtml()
using (var httpClient = new HttpClient())
{
var html = await httpClient.GetStringAsync("http://xamarin.com");
}
}
Source:
Simple.
Using the class WebClient
System.Net
using (var client = new WebClient())
{
string htmlCode = client.DownloadString("http://uol.com.br");
}
Or using HttpClient
from < a href="https://msdn.microsoft.com/en-us/library/system.net.http(v=vs.118).aspx"> System.Net.Http
using (var httpClient = new HttpClient())
{
var html = httpClient.GetString("http://uol.com.br");
}