[ANN] wtr (Well Typed Router) v2.0.0 released

Dear OCamlers,

I am pleased to announce v2.0.0 release of wtr (Well Typed Router). wtr is a trie-based router for OCaml HTTP web applications.

v2.0.0 release adds support for specifying and matching HTTP methods in a router. So now we can do the following;

Wtr.(
    create
      [ {%wtr| get,post,head,delete  ; /home/about/  |} about_page
      ; {%wtr| head                  ; /home/:int/   |} prod_page
      ]

Note: we can specify single or multiple HTTP methods supported by a route.

The release also features a pretty-printer - Wtr.pp - for a Wtr.t type. This has proven to be very useful when diagnosing/understanding routing issues. Sample output below,

   POST
     /home
       /about
         /
       /:float
         /
   HEAD
     /home
       /about
         /
       /:int
         /

The manual has also been improved in this release.

wtr API
CoHTTP demo
CLI demo

Changes v2.0.0

Enjoy,
Bikal Lem

9 Likes