Route HTTP methods to different method calls
Pseudo code for POST and PUT methods

refer to HTTP spec http://tools.ietf.org/html/rfc7231#section-4.3