How to access an HTML page and return your HTML using Xamarin.Forms?

0

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.

    
asked by anonymous 29.01.2017 / 00:16

2 answers

0
private async void GetHtml()
    using (var httpClient = new HttpClient())
    {
        var html = await httpClient.GetStringAsync("http://xamarin.com");
    }
}
  

Source:

link

    
30.01.2017 / 02:18
0

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");
}
    
30.01.2017 / 00:31