Added dispatching logic to POST method