We simplified the API to the dispatcher module so that it can be used easily in a standalone fashion. In cases where another application (such as CouchDB) wants to use Webmachine-style dispatching, it is now easy to just call
webmachine_dispatcher:dispatch/2and get a useful result without any of the rest of Webmachine running. A trivial example:
The other change that is most interesting from a feature point of view is that the request body is not read off the socket until the first time
wrq:req_body/1is called. This means that a resource can (for example) return an error response code without having to wait for the body to be pulled off the wire first.
There is also a change in the
new_webmachineproject creation script. Your list of dispatch terms will now by default be in a separate file ("priv/dispatch.conf") instead of directly in your application's
This version is identified with the "webmachine-1.2" mercurial tag,
In upcoming versions, we hope to add a few much-clamored-for features such as host-based dispatching and incremental request/response body reading and writing.