Added dispatching functionality based on GET/POST requests