[99s-extend] Cowboy questions

Bip Thelin bip at kivra.com
Sun Feb 10 20:12:27 CET 2013


Hi,

 I'm playing around with a middleware and request/responsehooks. A couple of questions that have surfaced:
* Say I map a module to "/my/path[...]" and then curl "/my/path/even/more/stuff". Is there a way to retrieve the "rest" of the matched path, i.e. like cowboy_req:path_info/1 but just the rest, not the total path. The result I want is: [<<"even">>, <<"more">>, <<"stuff">>].
* I've been trying to use a responsehook to ensure that a default content-type is set if none is specified. Been trying with cowboy_req:reply, coboy_req:set_resp_headers, etc. It doesn't seem to work that well. What's the preferred way?

Regards,
-Bip Thelin

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ninenines.eu/archives/extend/attachments/20130210/1b9560c2/attachment.html>


More information about the Extend mailing list