I think it is better if I explain the situation so this doesn't seem too arcane a question. I want to release some starter code for a project I want some of my students to work on. The project involves scraping through some internet webpages and as such, I want to provide them with a URLStream class that will download the html of an input url and return it as a string to them.
The issue is that I can't seem to find a particularly nice way to deal with networking in a way that will be cross platform (the students have mac/windows/linux machines). I know of libraries like Boost asio and libCurl, but the issue with using these is that I can't enforce all my students download them. So my question is twofold:
wxWidgets is a free and open source cross-platform C++ framework for writing advanced GUI applications using native controls.
cpp-netlib is a collection of network-related routines/implementations geared towards providing a robust cross-platform networking library.
wxWidgets is a C++ library that lets developers create applications for Windows, macOS, Linux and other platforms with a single code base.
Boost.Asio
is really not suitable for your needs as it involves huge Boost and building at least some of its non-header-only libs. You can still consider Asio
lib that can be used w/o Boost and is header-only lib, so much less hassle for you and your students. As it's probably the most popular and modern networking C++ lib this exercise can provide some useful experience to the students. Asio examples also have a simple HTTP client.
As a side note, are you bound to C++ for this assignment? It would be much simpler in Python or similar languages that provide networking out of the box.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With