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
AI-generated apps that pass security review Icon
AI-generated apps that pass security review

Stop waiting on engineering. Build production-ready internal tools with AI—on your company data, in your cloud.

Retool lets you generate dashboards, admin panels, and workflows directly on your data. Type something like “Build me a revenue dashboard on my Stripe data” and get a working app with security, permissions, and compliance built in from day one. Whether on our cloud or self-hosted, create the internal software your team needs without compromising enterprise standards or control.
Try Retool free
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