Routing Http Requests with Scala 3
summary
Crop is a routing library that actually ships: compositional, type-safe routing with Crop values, reversible path-to-link generation (string reverse-routing works today, client generation is planned), and developer-friendly error pages that list why a request failed. Implementation uses Scala 3 tuple types, match types and finite state machine builders to track method/path/headers/entity order, compiles to http4s and uses cats-effect IO, and favors IDE dot-completion and clearer error messages over heavy type gymnastics.
AI-written summary · about
chapters (25)
- 0:00Crop web framework intro
- 2:50Request routing basics
- 3:33Play Framework routing
- 4:38http4s pattern matching
- 5:20Tapir combinator routing
- 6:05Crop routing design
- 7:48Business logic vs HTTP
- 8:51Compositional routing paths
- 9:56Reverse routing links
- 10:38Data vs code routing
- 12:49Path extraction variadic types
- 14:11Scala 3 tuple types
- 17:01Tuple functions to handlers
- 18:48Requests with state machines
- 21:59Routing libraries comparison
- 24:09Developer experience routing
- 27:00Live coding dot-driven
- 28:28Error handling messages
- 30:12Why Scala 3 routing
- 31:16Crop future summary
- 31:38Q&A HTTP method errors
- 33:23Q&A Cats Effects http4s
- 34:49Q&A OpenAPI docs
- 36:35Q&A route composition
- 39:24Q&A pagination endpoints
related talks
26mModern HTTP Routing
33mYour HTTP endpoints are data, as well!
45mA Server is Just a Function An Introduction to http4s
50mReitit, the Ancient Art of Routing
37mFP Scala Meat & Potatoes...
56mBeyond URL Matching: Mastering the Spray/Akka-Http Routing DSL
55m“Using Functional Programming Patterns..."
28mAutomating API Busywork with Scala
