Improve n2o_cowboy_rest handler