Files
cpp-httplib/docs-src/pages/en/cookbook/index.md
2026-04-10 18:47:42 -04:00

3.5 KiB

title, order, status
title order status
Cookbook 0 draft

A collection of recipes that answer "How do I...?" questions. Each recipe is self-contained — read only what you need. For an introduction to the basics, see the Tour.

Client

Basics

Authentication

File Upload

Streaming & Progress

Connection & Performance

Error Handling & Debugging

Server

Basics

Streaming & Files

Handler Chain

Error Handling & Debugging

Operations & Tuning

TLS / Security

  • T01. Choosing between OpenSSL, mbedTLS, and wolfSSL (build-time #define differences)
  • T02. Control SSL certificate verification (disable, custom CA, custom callback)
  • T03. Set up an SSL/TLS server (certificate and private key)
  • T04. Configure mTLS (mutual TLS with client certificates)
  • T05. Access the peer certificate on the server (req.peer_cert() / SNI)

SSE

  • E01. Implement an SSE server
  • E02. Use event names to distinguish event types
  • E03. Handle reconnection (Last-Event-ID)
  • E04. Receive SSE events on the client

WebSocket

  • W01. Implement a WebSocket echo server and client
  • W02. Configure heartbeats (set_websocket_ping_interval)
  • W03. Handle connection close
  • W04. Send and receive binary frames