Which library is better for HTTP? Wget, cUrl, LibWWW or any thing else开发者_Go百科?
I want a portable C/C++ library.
Thanks
Wget is not a HTTP library, it is an application. Calling this programmatically using system()
or similar calls is disrecommended.
cURL is also not a HTTP library, but it's backend is libcurl. This libcurl is one of the most used HTTP libraries in C and C++ in the world. When you read cURL in a programming context you can often assume they mean libcurl, and not the application cURL.
Choosing between libcurl and LibWWW I think most would go with libcurl (I would). Quoting Wikipedia:
libcurl is considered to be a modern replacement for libwww
This list is very complete: http://curl.haxx.se/libcurl/competitors.html
wget2 has a backend library. Code using the library can be compiled with lwget
flag. Give it a try.
https://gnuwget.gitlab.io/wget2/reference/
精彩评论