A C++11 single-file header-only cross-platform HTTP/HTTPS library. It's extremely easy to setup. Just include the httplib.h file in your code! This is a multi-threaded 'blocking' HTTP library. If you are looking for a 'non-blocking' library, this is not the one that you want. SSL support is available with CPPHTTPLIB_OPENSSL_SUPPORT. libssl and libcrypto should be linked. When using SSL, it seems impossible to avoid SIGPIPE in all cases, since on some operating systems, SIGPIPE can only be suppressed on a per-message basis, but there is no way to make the OpenSSL library do so for its internal communications. If your program needs to avoid being terminated on SIGPIPE, the only fully general way might be to set up a signal handler for SIGPIPE to handle or ignore it yourself. cpp-httplib officially supports only the latest Visual Studio. It might work with former versions of Visual Studio, but I can no longer verify it.

Features

  • Bind a socket to multiple interfaces and any available port
  • Static file server
  • Built-in mappings
  • Post routing handler
  • Pre routing handler
  • Receive content with a content receiver

Project Samples

Project Activity

See All Activity >

License

MIT License

Follow cpp-httplib

cpp-httplib Web Site

Other Useful Business Software
Ditto Edge Server is a lightweight standalone server for resource-constrained edge environments, based on the core Ditto Edge SDK. Icon
Ditto Edge Server is a lightweight standalone server for resource-constrained edge environments, based on the core Ditto Edge SDK.

With Ditto Edge Server, you can join devices as small as a Raspberry Pi to a local mesh network and synchronize data across edge environments.

Ditto's Edge SDK is the only thing your edge devices need to ensure your application is operational in any environment, regardless of network conditions.
Learn More
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of cpp-httplib!

Additional Project Details

Operating Systems

Windows

Programming Language

C++

Related Categories

C++ Application Servers, C++ Libraries

Registered

2021-11-22