5HT/n2o — pull request #38 by b0oh (2013-09-30 14:42:23+00:00)
Title: Improve n2o_cowboy_rest handler

# This is prototype of new n2o rest handler
JSON is not implemented yet

https://github.com/b0oh/n2o_rest – example application
https://github.com/b0oh/n2o_rest/blob/master/apps/web/src/users.erl – rest module

## Statuses
On the POST and PUT requests returns 422 status when validation failed.

## Callbacks
### Mandatory callbacks
* is_rest/0, exists/1, get/0, get/1, post/1, put/2, delete/1, to_html/1
* if post or put callback return false then response status will be 422

### Optional
* data_processable — if return false then response status will be 422
* html_layout

Showcase
`open localhost:8000/rest/users`
`curl -i -H "Content-Type: application/x-www-form-urlencoded" -X PUT -d "id=5HT&email=5HT@synrc.com" localhost:8000/rest/users/maxim`
`curl -i -H "Content-Type: application/x-www-form-urlencoded" -X POST -d "id=" localhost:8000/rest/users`
`curl -i -H "Content-Type: application/x-www-form-urlencoded" -X POST -d "id=5HT" localhost:8000/rest/users`
`curl -i -H "Content-Type: application/x-www-form-urlencoded" -X POST -d "id=johndoe" localhost:8000/rest/users`
`curl -i -X DELETE localhost:8000/rest/users/johndoe`