Search code examples
clinuxopen-sourceshared-libraries

Difference between libcurl and libsoup


What are the advantages and disadvantages of using libcurl and libsoup?

Which one is better to use for a HTTP operation where I have to send request to a server to get a response, and has a quick reaction time?


Solution

  • Libsoup is coming along, but libcurl has much better support and stability. Lib soup devs readily admit that you should probably be using libcurl.

    The 4th item is especially important because even on Linux KDE and XCF users will install gnome-related libs, but it isn't nice to force them to use the gnome libraries when a platform independent option is available.

    1. libcurl is (far) more portable
    2. libsoup lacks support for: NTLM for proxies (Proxy-Authentication:), GSS, trailers in chunked responses, OpenSSL
    3. libsoup offers server-side support
    4. libsoup is using GNOME-related libs, making it a less convenient choice for non-GNOME environments.

    "I found that libsoup is far slower than libcurl. It uses at least 4x the amount of CPU to transfer a high-bitrate datastream over HTTP. I attribute this to the over-reliance on heavy-weight glib/gobject constructs. Man, that stuff is slow and a pain to use!" - Matt Gruenke