{"action":"closed","issue":{"url":"https://api.github.com/repos/hapijs/hapi/issues/2515","labels_url":"https://api.github.com/repos/hapijs/hapi/issues/2515/labels{/name}","comments_url":"https://api.github.com/repos/hapijs/hapi/issues/2515/comments","events_url":"https://api.github.com/repos/hapijs/hapi/issues/2515/events","html_url":"https://github.com/hapijs/hapi/issues/2515","id":71391022,"number":2515,"title":"Can I pass a route handler to another route handler?","user":{"login":"namlet","id":60198,"avatar_url":"https://avatars.githubusercontent.com/u/60198?v=3","gravatar_id":"","url":"https://api.github.com/users/namlet","html_url":"https://github.com/namlet","followers_url":"https://api.github.com/users/namlet/followers","following_url":"https://api.github.com/users/namlet/following{/other_user}","gists_url":"https://api.github.com/users/namlet/gists{/gist_id}","starred_url":"https://api.github.com/users/namlet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/namlet/subscriptions","organizations_url":"https://api.github.com/users/namlet/orgs","repos_url":"https://api.github.com/users/namlet/repos","events_url":"https://api.github.com/users/namlet/events{/privacy}","received_events_url":"https://api.github.com/users/namlet/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":19,"created_at":"2015-04-27T20:22:30Z","updated_at":"2015-04-30T11:44:08Z","closed_at":"2015-04-30T11:44:08Z","body":"I'd like to pass a request to a generic route handler and have that function determine which route handler to pass the request onto. Is this possible?\r\n\r\nFor instance, a user POSTs to the /message resource. In that message there is a type parameter. If the type is sms, I want to send it to the twilio route handlers contained in a different route file. If the type is email, I'd send it to a different route handler.\r\n\r\nIs there any way to simple pass the request along to another handler, like middleware works?\r\n\r\n"}}