caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Spiros Eliopoulos <seliopou@gmail.com>
To: OCaml <caml-list@inria.fr>
Subject: [Caml-list] ANN: webmachine.0.3.0
Date: Fri, 11 Dec 2015 11:16:44 -0500	[thread overview]
Message-ID: <CAEkQQg+Cs3z8vhK46R7qB7w07cNyQRWdoV=+xuZeFaDZuAqZAg@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1238 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 1711 bytes --]

                 reply	other threads:[~2015-12-11 16:17 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAEkQQg+Cs3z8vhK46R7qB7w07cNyQRWdoV=+xuZeFaDZuAqZAg@mail.gmail.com' \
    --to=seliopou@gmail.com \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).