[99s-extend] Proposal for Cowboy Routing
Loïc Hoguin
essen at ninenines.eu
Tue Nov 13 16:46:15 CET 2012
On 11/13/2012 04:42 PM, Dave Cottlehuber wrote:
> 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.
I'll add to that that in the case of integer, we could very well bind
the value as an integer instead of as a binary, and avoid all these
pesky list_to_integer(binary_to_list(Value)).
--
Loïc Hoguin
Erlang Cowboy
Nine Nines
http://ninenines.eu
More information about the Extend
mailing list