~/talk

Building RESTful Interfaces in C++ With nlohmann and cpp-httplib

Talkat C++ on Sea 2023 · 2023-06-28..06-30· [c-and-cpp]
slides:none on file

Builds a working REST API stack in C++ using nlohmann::json and cpp-httplib, with header-only libraries and a small in-house scaffold; code (server + client) is on GitHub and compiles. It runs in payments production (processing ~700M transactions in 10 months), meets 22s network timeouts to card networks, uses ZeroMQ for internal messaging, prefers strong types via from_json/to_json, treats DELETE as disallowed and uses PUT/POST for updates and voids, and notes the client is blocking.

AI-written summary · about

  1. 0:00Credit card processing intro
  2. 3:10CRUD and REST basics
  3. 7:01REST constraints and architecture
  4. 12:37JSON over XML for APIs
  5. 16:54Header-only libraries and performance
  6. 22:13Basic HTTP server with REST endpoints
  7. 31:58Routing and security setup
  8. 38:39nlohmann JSON for API requests
  9. 44:17URI parameters and updates
  10. 47:31HTTP client for testing
  11. 51:07Live demo: server and client
  12. 54:44Lessons learned and best practices
  13. 56:53Summary and GitHub repo
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.