qmetrics.net

cpp-httplib

Single-header C++ HTTP and HTTPS client library

cpp-httplib screenshot

A C++11 header-only library that implements HTTP/HTTPS servers and clients. Include one header file and link optional TLS backends when you need encryption.

Overview

cpp-httplib gives C++ programs a compact way to speak HTTP/1.1 over plain TCP or TLS. Setup is meant to stay simple: add the header to a project and start defining routes or client requests without pulling in a large framework.

The library covers both sides of the connection. Servers can register handlers for common and custom verbs, serve static files, stream bodies, and optionally expose WebSockets and server-sent events. Clients support ordinary requests, downloads, and TLS with several backend choices including OpenSSL, Mbed TLS, and wolfSSL, plus hooks for custom certificate verification and mutual TLS.

APIs use lambdas and straightforward method names. Networking is blocking with a thread pool rather than non-blocking I/O, and only HTTP/1.1 is supported. The authors position it for embedded HTTP in tools, small API services, mocks in tests, and similar workloads rather than huge concurrent fan-out.

Optional features include content encodings, file uploads, access and error logging reminiscent of traditional web servers, and platform integration for system certificate stores on macOS and Windows. It targets 64-bit environments on Windows, macOS, and Linux with a C++11-or-later toolchain.

Key features

  • HTTP/1.1 server and client
  • Single-file header-only distribution
  • SSL/TLS via multiple backends
  • WebSocket and SSE support
  • Static file serving
  • Custom HTTP methods and routing
  • Stream-oriented request and response APIs
  • Platform CA store integration

Use cases

  • Lightweight local API servers
  • HTTP clients inside C++ tools
  • Mock HTTP services for testing
  • Embedded HTTP in desktop utilities

Tags

Similar software

axios

Promise-based HTTP client for browser and Node.js

Axios is a promise-based HTTP client for JavaScript environments in the browser and Node.js. It supports common request methods, configurable defaults, and interceptors for request and response handling.

★ 109.5k⟳ 2 days agoMIT

FastAPI

Python web framework for building APIs with type hints

FastAPI is a Python web framework for building APIs using standard type hints. It builds on Starlette and Pydantic and generates interactive OpenAPI documentation for the endpoints you define.

★ 105.1k⟳ 9 days agoMIT

OmniRoute

OpenAI-compatible AI gateway with provider routing

OmniRoute exposes one endpoint that routes chat requests across many LLM providers with quota-aware fallback and compression.

★ 90.7k⟳ todayMIT

Hoppscotch

Web, desktop and CLI API development ecosystem

Hoppscotch lets developers send HTTP, WebSocket, GraphQL, and related API requests from a lightweight client. Collections, environments, teams, and sync help organize testing across devices.

★ 81k⟳ 5 days agoMIT
Open Source Alternative to:Postman

NestJS

Progressive TypeScript framework for Node.js backends

Nest organizes Node server apps with modules, dependency injection, and first-party packages for auth, data, queues, and observability.

★ 77.2k⟳ todayMIT

JSON Server

Zero-code mock REST API from JSON data files

JSON Server turns a JSON or JSON5 database file into a REST API for local prototyping. It supports filtering, sorting, pagination, embedding relations, and static assets.

★ 75.7k⟳ 8 months agoMIT