The easiest way to download an HTML page from the web?

I have a webpage whose contents I would like to download in wxString. For example, let's say the page is like this:

http://www.example.com/mypage.html

And wxString will contain the HTML source. In some other languages, say PHP, for example, I would write something like this:

$html = file_get_contents('http://www.example.com/mypage.html');

I assume this is not a single-line font in wxWidgets, and I looked into the wxHTTP class, but I wonder if there is some simple wrapper class that does the work with minimal code?

+3
source share
3 answers

Windows, Microsoft WinHTTP. , wxHTTP, WinHTTP, , .

wxHTTP. , .

+2

libcurl
google .

+1

You will obviously have to write your own packaging.

But libcurl has a simpler interface, which may be easier to use, although this adds a new dependency to your program.

0
source

Source: https://habr.com/ru/post/1728383/


All Articles