Day 3: Illuminating HTTP’s Dark Corners

Webmachine has a unique way of modeling HTTP requests as a state machine, but so far you’ve seen it handling things you’ve likely seen in most web libraries and frameworks. Let’s look at some things that Webmachine enables that aren’t usually found in its peers.

First, we’ll take a look at caching. The HTTP protocol has a lot of support for caching, including expiry and versioning. Webmachine exposes these features in resource functions, just like the other parts of HTTP you’ve already seen.

After caching, we’ll look at HTTP authorization. While some frameworks support authorization, most don’t support HTTP-based authorization and many don’t support any kind at all out of the box. For Webmachine, ...

Get Seven Web Frameworks in Seven Weeks now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.