A Server is Just a Function An Introduction to http4s
summary
http4s presents concrete choices: a functional HTTP library for Scala http4s built on cats-effect and fs2 that makes requests, responses and bodies the same types for client and server client and server share request/response types. It uses Resource and Stream for deterministic cleanup Resource ensures acquisition and cleanup, supports middleware you can wrap around apps and clients, provides in‑memory route testing (no TCP) and server‑side WebSockets, with examples of composing, streaming, and safe shutdown.
AI-written summary · about
chapters (16)
- 0:00Introduction
- 9:34Routing DSL
- 12:31Client
- 14:50Other Methods
- 19:37Creating a Client
- 21:24Testing the Client
- 23:48Resource
- 26:48Stream
- 29:11Resource Safety
- 33:06Accessibility
- 33:26Composing Functions
- 34:32Wrapping Functions
- 39:48Learn more
- 40:15Bonus slide
- 42:10Mock server
- 43:51Outro
related talks
37mFP Scala Meat & Potatoes...
28mHTTP through Functional Programming
25mTaming Client-Server Communication
29mPure Scala Approach for Building Frontend and Backend Apps
36mResource Management Made Easy: Introducing Resource from cats-effect Library
47mLet's derive HTTP clients from types
01h 09mAkka-http: connect to the world
30mDistributing systems in Scala with Fiangle
