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

nel_h2
Secure User Management, Made Simple | Frontegg Icon
Secure User Management, Made Simple | Frontegg

Get 7,500 MAUs, 50 tenants, and 5 SSOs free – integrated into your app with just a few lines of code.

Frontegg powers modern businesses with a user management platform that’s fast to deploy and built to scale. Embed SSO, multi-tenancy, and a customer-facing admin portal using robust SDKs and APIs – no complex setup required. Designed for the Product-Led Growth era, it simplifies setup, secures your users, and frees your team to innovate. From startups to enterprises, Frontegg delivers enterprise-grade tools at zero cost to start. Kick off today.
Start for 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