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

Asked

Viewed 304 times

0

I would like to know how I can access a page, example Uol.com.br, and return your HTML. Along with this return try to use regular expressions with this HTML.

2 answers

0

Simple.

Using the class WebClient of System.Net

using (var client = new WebClient())
{
    string htmlCode = client.DownloadString("http://uol.com.br");
}

Or using HttpClient of System.Net.Http

using (var httpClient = new HttpClient())
{
    var html = httpClient.GetString("http://uol.com.br");
}

0


Browser other questions tagged

You are not signed in. Login or sign up in order to post.