2

I'm trying to get the HTML content of a webpage via the URL in a Xamarin Forms project, but I don't know how. I've tried to use stuff like this, but this it not working in a portable project: Get HTML code from website in C#

Unfortunately, it's not possible to use System.Net.Http. Someone recommended to use ModernHttpClient, but I don't know how to use this to get the HTML via a webpage URL. I can't find the answer in the example on the github page: https://github.com/paulcbetts/ModernHttpClient

Thanks in advance for any help!

BR, FG

Community
  • 1
  • 1
F.G.
  • 75
  • 2
  • 9

1 Answers1

3

It's definitely possible to use System.Net.Http in your app. All you need to do is to install a nuget package: "Microsoft.Net.Http" (https://www.nuget.org/packages/Microsoft.Net.Http).

Daniel Luberda
  • 7,374
  • 1
  • 32
  • 40