Hi all,

I wanted to bring to your attention the latest release of webmachine, weighing in at version 0.3.0. This release includes bugfixes and a few major API changes. Most notably is the way that users must create redirect responses. There was an ambiguity in the state machine when dealing with POST requests and redirects. To allow both a Location header to be set for a POST response and redirection, users should use the redirect function on the Rd record like so:

  Webmachine.continue body (Rd.redirect "/path/to/resource" rd)

Setting the Location header for a POST response remains unchanged.

In addition, the is_authorized handler now deviates slightly from the original Erlang implementation. The return type for that function now looks like this:

  type auth =
    [ `Authorized        (* The request is authorized to proceed *)
    | `Basic of string   (* Basic authentication challenge[0] for the given realm *)
    | `Redirect of Uri.t (* Use the given URI to authenticate *)
    ]

You can see the full list of changes in the release notes:

  https://github.com/inhabitedtype/ocaml-webmachine/releases/tag/0.3.0

As always, issues and pull requests are welcomed.

-Spiros E.

[0]: https://tools.ietf.org/html/rfc2617