cpp-httplib VS conan

Compare cpp-httplib vs conan and see what are their differences.

cpp-httplib

A C++ header-only HTTP/HTTPS server and client library (by yhirose)

conan

Conan - The open-source C and C++ package manager (by conan-io)
Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
cpp-httplib conan
38 109
11,623 7,648
- 1.8%
8.7 9.8
7 days ago 5 days ago
C++ Python
MIT License MIT License
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

cpp-httplib

Posts with mentions or reviews of cpp-httplib. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-11-06.
  • Experience using crow as web server
    11 projects | /r/cpp | 6 Nov 2023
    Alternatives at the low to medium level of abstraction include civetweb and mongoose, which have a common ancestor. Both of these appear to be C rather than C++, but seem to be production quality and well-documented. Another C library is cpp-httplib, which is probably too low-level for me.
  • REST APIs using C++. (Is this even done much?)
    13 projects | /r/cpp | 29 Mar 2023
    I use this all the time to expose an admin rest interface to my public installations.
  • Compiling CrowCPP on Windows and about to kms
    3 projects | /r/cpp | 8 Mar 2023
  • PocketPy: A Lightweight(~5000 LOC) Python Implementation in C++17
    8 projects | /r/cpp | 6 Feb 2023
    Every one of these libraries uses CMake to make it easier for end users to consume their libraries. In fact your example uses CMake as well such that I can consume it the way I describe above.
    8 projects | /r/cpp | 6 Feb 2023
    You can also take a look at cpp-httplib to learn the practice of single-header file library.
  • xbps-src ARM: glslangValidator: cannot execute binary file: Exec format error
    11 projects | /r/voidlinux | 5 Jan 2023
    # Template file for 'yuzu-mainline' pkgname=yuzu-mainline version=1295 revision=1 _cubeb_version=75d9d125ee655ef80f3bfcd97ae5a805931042b8 _sanitizers_cmake_version=aab6948fa863bc1cbe5d0850bc46b9ef02ed4c1a _dynarmic_version=bd570e093ca1d1206961296b90df65cda7de8e87 _sirit_version=d7ad93a88864bda94e282e95028f90b5784e4d20 _mbedtls_version=8c88150ca139e06aa2aae8349df8292a88148ea1 _xbyak_version=348e3e548ebac06d243e5881caec8440e249f65f _SDL_version=f17058b562c8a1090c0c996b42982721ace90903 _cpp_jwt_version=e12ef06218596b52d9b5d6e1639484866a8e7067 _cpp_httplib_version=305a7abcb9b4e9e349843c6d563212e6c1bbbf21 _Vulkan_Headers_version=00671c64ba5c488ade22ad572a0ef81d5e64c803 create_wrksrc=yes build_wrksrc=${pkgname}-mainline-0-${version} build_style=cmake configure_args="-DYUZU_CHECK_SUBMODULES=OFF -DYUZU_TESTS=OFF -DSIRIT_USE_SYSTEM_SPIRV_HEADERS=ON" hostmakedepends="pkg-config qt5-host-tools qt5-qmake clang" makedepends="fmt-devel libenet-devel inih-devel libusb-devel liblz4-devel opus-devel zlib-devel libzstd-devel boost-devel qt5-devel qt5-multimedia-devel libva-devel ffmpeg-devel glslang-devel SPIRV-Headers catch2 json-c++ speexdsp-devel" short_desc="Nintendo Switch Emulator" maintainer="Owen Law " license="GPL-3.0-or-later" homepage="https://github.com/yuzu-emu/yuzu-mainline" changelog="${homepage}/releases/tag/mainline-0-${version}" distfiles="${homepage}/archive/refs/tags/mainline-0-${version}.tar.gz https://github.com/herumi/xbyak/archive/${_xbyak_version}.tar.gz https://github.com/MerryMage/dynarmic/archive/${_dynarmic_version}.tar.gz https://github.com/yuzu-emu/mbedtls/archive/${_mbedtls_version}.tar.gz https://github.com/mozilla/cubeb/archive/${_cubeb_version}.tar.gz https://github.com/arsenm/sanitizers-cmake/archive/${_sanitizers_cmake_version}.tar.gz https://github.com/yuzu-emu/sirit/archive/${_sirit_version}.tar.gz https://github.com/libsdl-org/SDL/archive/${_SDL_version}.tar.gz https://github.com/arun11299/cpp-jwt/archive/${_cpp_jwt_version}.tar.gz https://github.com/yhirose/cpp-httplib/archive/${_cpp_httplib_version}.tar.gz https://github.com/KhronosGroup/Vulkan-Headers/archive/${_Vulkan_Headers_version}.tar.gz" checksum="b8b2616a24653352b8afd145ee46eb9ead07c6ef3aff8c0ff3a6225b381b4b85 fbe54fc881cdfb0876ddc8f29f74674a311ba7ae4b774751cb1b637c043e3bae 170530852547ee2f5517b0a12e643646e51a9974414084d389a85632df7c4518 8d3553ea5c3b47789c5a1a6437f948525d0a8ce2a0897000a36b511000c6bad4 8c5b7ca55ee586a3e5e63de2d31c319045f92e949140a734846a0d69ad342e2e 9f5b073625375322236a94ce8d2d803cdedad321c91e63845f487b9ebfb2c433 6612f924d1f2b2c7cb37effcda5d78550fad276887ee8f9bc391b9ecbf9e4a64 2a149e79712027d2d8141e3233df2f6679825b6f78237db3db72bc6cfc08b845 b4cc0e1f89d3c60a4dde74baa730a90de13c5dd5155b09d8dd34cd3205a6e758 61a97686b03edffa737c396f54e48da2ff0a04c3f6859ec9e80853aea6508030 99443e30caee5d2c0019de6549cc0c7c0432214494617da445753fc46374a7c3" post_extract() { mv "xbyak-${_xbyak_version}" xbyak cp -r xbyak "${build_wrksrc}/externals" mv "dynarmic-${_dynarmic_version}" dynarmic cp -r dynarmic "${build_wrksrc}/externals" mv "mbedtls-${_mbedtls_version}" mbedtls cp -r mbedtls "${build_wrksrc}/externals" mv "SDL-${_SDL_version}" SDL cp -r SDL "${build_wrksrc}/externals" mv "cubeb-${_cubeb_version}" cubeb mv "sanitizers-cmake-${_sanitizers_cmake_version}" sanitizers-cmake cp -r sanitizers-cmake cubeb/cmake cp -r cubeb "${build_wrksrc}/externals" mv "sirit-${_sirit_version}" sirit cp -r sirit "${build_wrksrc}/externals" mv cpp-jwt-${_cpp_jwt_version} cpp-jwt cp -r cpp-jwt ${build_wrksrc}/externals mv cpp-httplib-${_cpp_httplib_version} cpp-httplib cp -r cpp-httplib ${build_wrksrc}/externals mv Vulkan-Headers-${_Vulkan_Headers_version} Vulkan-Headers cp -r Vulkan-Headers ${build_wrksrc}/externals }
  • What are some cool modern libraries you enjoy using?
    32 projects | /r/cpp | 18 Sep 2022
  • Networking TS: first impression and questions;
    4 projects | /r/cpp | 9 Apr 2022
  • The Lisp Curse
    11 projects | news.ycombinator.com | 25 Mar 2022
    I like working in C++, after a decade of working in Java, Python, Javascript and Clojure, I find working in C++ (which I learned before these other languages) to be quite fun and pleasant, at least with relatively modern C++.

    I've been, on and off, working on a little toy game engine, for a few years. Its a mix of keeping up with C++ advancements, learning various concepts like physically based rendering, and just the fun of crafting a big project, with no constraints other than my time and ability, no deadlines, no expectation of releasing anything. Its cathartic and enjoyable. I really do enjoy it.

    Last September, I got frustrated with something I was working on in a more serious capacity. It was some server software, it responded to HTTP requests, it accessed third party services over HTTP and Websockets, it talked to a Postgres database. Overall it was an event driven system that transformed data and generated actions that would be applied by talking to third party services. The "real" version was written in Clojure and it worked pretty well. I really like Clojure, so all good.

    But because I was frustrated with some things about how it ran and the resources it took up, I wondered what it would be like if I developed a little lean-and-mean version in C++. So I gave it a try as a side project for a few weeks. I used doctest[1] for testing, immer[2] for Clojure-like immutable data structures, [3] lager for Elm-like application state and logic management, Crow[4] for my HTTP server, ASIO[5] and websocketpp[6] for Websockets, cpp-httplib[7] as a HTTP client and PGFE[8] for Postgres, amongst some other little utility libraries. I also wrote it in a Literate Programming style using Entangled[9], which helped me keep everything well documented and explained.

    For the most part, it worked pretty well. Using immer and lager helped keep the logic safe and to the point. The application started and ran very quickly and used very little cpu or memory. However, as the complexity grew, especially when using template heavy libraries like lager, or dealing with complex things like ASIO, it became very frustrating to deal with errors. Template errors even on clang became incomprehensible and segmentation faults when something wasn't quite right became pretty hard to diagnose. I had neither of these problems working on my game engine, but both became issues on this experiment. After a few weeks, I gave up on it. I do think I could have made it work and definitely could go back and simplify some of the decisions I made to make it more manageable, but ultimately, it was more work than I had free time to dedicate to it.

    So my experience was that, yes, you can write high level application logic for HTTP web backends in C++. You can even use tools like immer or lager to make it feel very functional-programming in style and make the application logic really clean. Its not hard to make it run efficiently both in terms of running time and memory usage, certainly when comparing to Clojure or Python. However, I found that over all, it just wasn't as easy or productive as either of those languages and I spent more time fighting the language deficiencies, even with modern C++, than I do when using Clojure or Python.

    I think I would think very long and hard before seriously considering writing a web backend in C++. If I had the time, I'd love to retry the experiment but using Rust, to see how it compares.

    [1] https://github.com/doctest/doctest

    [2] https://github.com/arximboldi/immer

    [3] https://github.com/arximboldi/lager

    [4] https://github.com/CrowCpp/crow

    [5] https://think-async.com/Asio/

    [6] https://www.zaphoyd.com/projects/websocketpp/

    [7] https://github.com/yhirose/cpp-httplib

    [8] https://github.com/dmitigr/pgfe

    [9] https://entangled.github.io/

  • making a web server in c++?
    5 projects | /r/cpp_questions | 24 Feb 2022
    i mostly use https://github.com/yhirose/cpp-httplib as its easy and header only

conan

Posts with mentions or reviews of conan. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-11-24.
  • My first Software Release using GitHub Release
    6 projects | dev.to | 24 Nov 2023
    There were various approaches recommended depending on our language and ecosystem. My classmates who developed using Node.js were recommended npm, and PyPI or poetry for Python. Since my program is written in C++, I was recommended to look into one of vcpkg or conan, but I ultimately did not use either package manager.
  • Anyone else frustrated with Conan2?
    3 projects | /r/cpp | 31 Aug 2023
    Hi u/instinkt900, Conan maintainer here. Thanks for your feedback! Please remember that we actively monitor and respond to our issue tracker on GitHub (https://github.com/conan-io/conan/issues/new/choose), we’d love to hear about your specific use cases or pain points, so that we can improve your experience and that of other users. The motivation behind most of the updates in Conan 2.0 was precisely feedback from the community, and to improve our ability to continue delivering features in the constantly changing C++ ecosystem. We can certainly do this at a quicker pace, with some exciting new features recently released and in the pipeline: package metadata, transparent backup of downloaded package sources, cache least-recently-used cleanup, etc. A lot of the big decisions that we took for Conan 2.0 were taken with consensus from expert users and contributors (https://conan.io/tribe) and https://github.com/conan-io/tribe. Some specific workflows may not have 1:1 replacements in Conan 2.0, and are likely to affect some of the “less travelled roads” of Conan 1.x, including some features that were always marked as experimental. We are happy to hear feedback so that we can best satisfy these use cases. Conan 2.0 also includes a more sophisticated API to cover cases where the built-in integrations may not satisfy users needs. For what it’s worth - we have also heard very positive feedback from users about how Conan 2.0 simplifies their workflows when compared to Conan 1.x. The C++ tooling ecosystem is fragmented and moves at different speeds, including our users. So it’s always a fine balancing act, but we don’t want to leave anyone behind! An example is Conan Center - over 90% (~1200) of all recipes have been migrated to support Conan 2.0, while still maintaining compatibility with Conan 1.x, precisely to avoid breaking users that are still on Conan 1.x.
  • Writing a Package Manager
    3 projects | news.ycombinator.com | 23 Aug 2023
    The closest thing we have at the moment is conan[1]. It’s a cross platform package manager that attempts to implement “toolchains”, whereby different build systems can be integrated[2]. This is a big problem with package management in C/C++, there’s no single, standardised build system that most projects use. There isn’t even a standardised compiler! So when hosting your own packages using Conan, often you need to make sure you build your application for three different compilers, for three different platforms. Sometimes (for modern MacOS) also for two different architectures each.

    If you control the compiler AND build system you can get away with just one package for most cases. This true for Microsoft’s C/C++ package manager, NuGet[3]

    Historically, the convention has been to use the package manager of the underlying system to install packages, as there are so many different build configurations to worry about when packaging the libraries. The other advantage of using the system package manager is that dependencies (shared libraries) that are common can be shared between many applications, saving space.

    [1] https://conan.io/

  • Good gui libraries for simple note taking app with sqlite database?
    2 projects | /r/cpp_questions | 5 Jul 2023
    I do however always recommend using a package manager: vcpkg or Conan to install and integrate third party libraries (together with CMake). This normally solves all the typical problems with dependencies.
  • chex: the homrgrown chess engine in C++
    2 projects | /r/cpp | 27 Jun 2023
    There's a few, look into Conan or vcpkg (the latter is my personal recommendation).
  • Is there a way to build a project from source with the same process between Windows and OSX?
    2 projects | /r/cmake | 24 May 2023
    You could check Conan and Vcpkg, they can be used to provide your dependencies for all three major platform (but I think only as pre-build binaries). Or you could embed the installers of your dependencies in your own.
  • Questions about how cmake is used
    2 projects | /r/cmake | 19 May 2023
    There are "package managers" for C++ which can download / build / install the packages you want to use in your project, you only need to give a list of the package names to it. If you want something like that you should check out Conan and vcpkg.
  • Recourses to help understand libraries/projects and setting them up?
    2 projects | /r/cpp_questions | 28 Apr 2023
    Luckily, it's 2023, and not 2003 anymore and there are better ways: package managers. Package managers like Conan and vcpkg use ready made recipes for downloading and building a lot of open-source software libraries, and they are made to work out of the box and also build dependencies and dependencies of dependencies. They keep track of all the dependencies a project needs and ensure that they all work together. CMake works really well with these package managers, so stick to that - it is the future.
  • Basic CMake question regarding subdirectories
    2 projects | /r/cpp_questions | 19 Apr 2023
    Or the absolute Gold standard in 2023: use a package manager: Conan or vcpkg.
  • I can't run my c++ project having Python.h header using cmake in Windows
    2 projects | /r/cpp_questions | 17 Apr 2023
    Lastly, if you still think it's frustrating to have to specify path to every dependency then jump on the modern C++ development wagon and start using a package manager like Conan or vcpkg.

What are some alternatives?

When comparing cpp-httplib and conan you can also consider the following projects:

Vcpkg - C++ Library Manager for Windows, Linux, and MacOS

libcurl - A command line tool and library for transferring data with URL syntax, supporting DICT, FILE, FTP, FTPS, GOPHER, GOPHERS, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, MQTT, POP3, POP3S, RTMP, RTMPS, RTSP, SCP, SFTP, SMB, SMBS, SMTP, SMTPS, TELNET, TFTP, WS and WSS. libcurl offers a myriad of powerful features

C++ REST SDK - The C++ REST SDK is a Microsoft project for cloud-based client-server communication in native code using a modern asynchronous C++ API design. This project aims to help C++ developers connect to and interact with services.

Crow - A Fast and Easy to use microframework for the web.

Boost.Beast - HTTP and WebSocket built on Boost.Asio in C++11

meson - The Meson Build System

Ncurses - ncurses Git mirror

cpr - C++ Requests: Curl for People, a spiritual port of Python Requests.

Restbed - Corvusoft's Restbed framework brings asynchronous RESTful functionality to C++14 applications.

POCO - The POCO C++ Libraries are powerful cross-platform C++ libraries for building network- and internet-based applications that run on desktop, server, mobile, IoT, and embedded systems.

Mongoose - Embedded Web Server

Boost.Program_options - Boost.org program_options module