Refactoring : Add the router.param method to handle ReST request with clean code.