[99s-extend] Proposal for Cowboy Routing

Dave Cottlehuber dch at jsonified.com
Tue Nov 13 16:42:53 CET 2012


On 13 November 2012 10:04, Loïc Hoguin <essen at ninenines.eu> wrote:
> Hello!
>
> I have put my thoughts on routing at the following gist:
>
>   https://gist.github.com/4064759
>
> Please comment or cry in terror if you're against it!
>
> Thanks.
>
> --
> Loïc Hoguin
> Erlang Cowboy
> Nine Nines
> http://ninenines.eu
> _______________________________________________
> Extend mailing list
> Extend at lists.ninenines.eu
> http://lists.ninenines.eu:81/listinfo/extend

I actually commented on the gist, here's a copy for the ML:

== dch ==

Looks very useful for me. I've not heard of imbrication until today, I
assume it is closest to nested optional components as used above.

Having regex capability in the constraints would be great:

{"/cars/:name/:color", [{color, in, [blue, red, pink]}], Handler,
Opts} might be {"/cars/:name/:color", [{color, regex, "^(blue | red |
pink)$", [other_re_parameters]) , Handler, Opts} for example.

== Loïc ==

Yes, regex will be a possible constraint. Also checking for integer
value. Not sure what else we'll want.

A+
Dave



More information about the Extend mailing list