0
How would I connect a UWP to the Internet?
First of all, how would I make a UWP be able to connect to the Internet using the API? I know that I need `using namespace Windows::Networking::Connectivity` but I'm not sure where to go after that. How do I establish whether there is an Internet connection or not? Secondly, say we have a website `www.sololearn.com` . What method would I use to extract data from it? For example: - A whole web page - Part of a webpage -A line of a webpage - A word of a website - The CSS and JS ?
5 Respuestas
+ 1
depends on what protocol you want to use. do you want to use http, ftp or something else? or do you want to work directly with tcp or udp.
for the website you would need an html parser. most common method is to use a html to xhtml cleanup library and then an xml parser or use one of the parsers thats part of the browsers
+ 1
like i said: what protocol do you want to use? do you just want to use http to download websites?
+ 1
have you tried the WebClient class from System.Net ? https://stackoverflow.com/questions/26233/fastest-c-sharp-code-to-download-a-web-page
you can also use http/https manually using the HttpClient class if you need finer controll or want to use the http(s) protocol in some other way(like get or post requests)
0
what about my first question?
0
https to take data from it