extend/cowboy — Issue #143: More declarative style of returning from Handler:handle
Author: maxlapshin
Created: 2012-02-14 20:36:22+00:00
State: open

Many problems like returning 500 in case of error could be solved much easier if to add other way of returning result from Handler:handle: not only {ok, Req, State}, but also something like {ok, Code, Headers, Response, Req, State}.

This may be useful to create Apache-like logging which is currently impossible in Cowboy (method, url, response size, response status) and to add many other cool features.

Also this approach is much more functional than current "dirty" way to go.

Have you thought about it?