Added a convenience function that makes it easier to handle GET routes.