Skip to the content.

cpp-http

cpp-http is a lightweight, high-performance, header-only C++17 HTTP/1.1 server and client library. It is built on top of cpp-tcpnet, leveraging its asynchronous, non-blocking TCP engine and a multi-threaded worker pool with session-affinity ordering to parse and route HTTP requests concurrently without stalling the main application thread.

Key Features

Documentation Pages

Welcome to the cpp-http documentation! Please follow the guide below to learn how to integrate and use the library:

  1. Getting Started Learn how to integrate cpp-http into your project via CMake or direct inclusion.

  2. Basic Usage Learn how to start the HTTP server and register basic GET/POST endpoints.

  3. Advanced Usage Explore advanced request processing, customized response structures, and HTTP header management.

  4. Performance & Tuning Learn about connection scaling limits, tweaking HTTP buffer limits, and optimizing TCP options.

  5. Architecture & Examples Understand the internal architecture of cpp-http and how it maps raw TCP buffers to routed HTTP structures.


Start Reading: Getting Started >