Build Content at Read Time
Compute a resource's body when it is requested.
Lazy, Not Eager
A dynamic resource doesn't store a fixed body. Its content is computed on demand, only when a client actually asks to read it. ⚡
The Read Triggers the Work
Your resource function runs at the moment of a read request. Nothing happens until a client reads it, so you never waste effort building content no one wants.
All lessons in this course
- Parameterized Resource URIs
- Build Content at Read Time
- List vs Templated Resources
- Notify Clients of Updates