Improve rest

* Add max body size limit
* Test for correct content-type