Introducing Webmachine

HTTP is often discussed as a simple protocol, but the truth is that it’s quite complicated. Most frameworks expose it only on a very basic level, using the ability to route requests based on methods and URLs and to return a few types of responses. They hide the full machinery, which has support for content negotiation, encodings, and caching.

Figure 20, Simple HTTP processing shows how most web frameworks expose the HTTP protocol.

images/src/webmachine/http-state-simple.png
Figure 20. Simple HTTP processing

It is simple to understand but hides most of HTTP’s power. If you want caching or content negotiation, you must implement the decision logic yourself in the ...

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.