{"action":"created","issue":{"url":"https://api.github.com/repos/pillarjs/send/issues/88","labels_url":"https://api.github.com/repos/pillarjs/send/issues/88/labels{/name}","comments_url":"https://api.github.com/repos/pillarjs/send/issues/88/comments","events_url":"https://api.github.com/repos/pillarjs/send/issues/88/events","html_url":"https://github.com/pillarjs/send/pull/88","id":121235389,"number":88,"title":"Index as function","user":{"login":"piranna","id":532414,"avatar_url":"https://avatars.githubusercontent.com/u/532414?v=3","gravatar_id":"","url":"https://api.github.com/users/piranna","html_url":"https://github.com/piranna","followers_url":"https://api.github.com/users/piranna/followers","following_url":"https://api.github.com/users/piranna/following{/other_user}","gists_url":"https://api.github.com/users/piranna/gists{/gist_id}","starred_url":"https://api.github.com/users/piranna/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/piranna/subscriptions","organizations_url":"https://api.github.com/users/piranna/orgs","repos_url":"https://api.github.com/users/piranna/repos","events_url":"https://api.github.com/users/piranna/events{/privacy}","received_events_url":"https://api.github.com/users/piranna/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/pillarjs/send/labels/pr","name":"pr","color":"006b75"}],"state":"closed","locked":false,"assignee":{"login":"dougwilson","id":67512,"avatar_url":"https://avatars.githubusercontent.com/u/67512?v=3","gravatar_id":"","url":"https://api.github.com/users/dougwilson","html_url":"https://github.com/dougwilson","followers_url":"https://api.github.com/users/dougwilson/followers","following_url":"https://api.github.com/users/dougwilson/following{/other_user}","gists_url":"https://api.github.com/users/dougwilson/gists{/gist_id}","starred_url":"https://api.github.com/users/dougwilson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dougwilson/subscriptions","organizations_url":"https://api.github.com/users/dougwilson/orgs","repos_url":"https://api.github.com/users/dougwilson/repos","events_url":"https://api.github.com/users/dougwilson/events{/privacy}","received_events_url":"https://api.github.com/users/dougwilson/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2015-12-09T13:13:17Z","updated_at":"2015-12-10T03:59:11Z","closed_at":"2015-12-10T03:59:11Z","pull_request":{"url":"https://api.github.com/repos/pillarjs/send/pulls/88","html_url":"https://github.com/pillarjs/send/pull/88","diff_url":"https://github.com/pillarjs/send/pull/88.diff","patch_url":"https://github.com/pillarjs/send/pull/88.patch"},"body":"Allow to define a function to generate the content of directory indexes"},"comment":{"url":"https://api.github.com/repos/pillarjs/send/issues/comments/163480498","html_url":"https://github.com/pillarjs/send/pull/88#issuecomment-163480498","issue_url":"https://api.github.com/repos/pillarjs/send/issues/88","id":163480498,"user":{"login":"dougwilson","id":67512,"avatar_url":"https://avatars.githubusercontent.com/u/67512?v=3","gravatar_id":"","url":"https://api.github.com/users/dougwilson","html_url":"https://github.com/dougwilson","followers_url":"https://api.github.com/users/dougwilson/followers","following_url":"https://api.github.com/users/dougwilson/following{/other_user}","gists_url":"https://api.github.com/users/dougwilson/gists{/gist_id}","starred_url":"https://api.github.com/users/dougwilson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dougwilson/subscriptions","organizations_url":"https://api.github.com/users/dougwilson/orgs","repos_url":"https://api.github.com/users/dougwilson/repos","events_url":"https://api.github.com/users/dougwilson/events{/privacy}","received_events_url":"https://api.github.com/users/dougwilson/received_events","type":"User","site_admin":false},"created_at":"2015-12-10T03:59:11Z","updated_at":"2015-12-10T03:59:11Z","body":"Hi again, @piranna ! Thanks for this pull request! Currently, this module sports an event emitter-driven interface (for better or worse). With the existing interface, this functionality already exists and is well supported (in fact, is being done on other modules on npm). Adding yet another way to do the same thing, especially where the interface is oddly different from the rest of the module, would be weird to accept.\r\n\r\nI would recommend you use the existing functionality at hand. If you have suggestion on making the EE interface better, it would be welcome! Here is the functionality from your test done using the existing interface (your test is the only communication we've had in regards to this, so that's the only example I have from you to use):\r\n```js\r\nsend(req, req.url, {index: false})\r\n.on('directory', function () {\r\n  // send your index from here, as the req.url provided ended up being a directory\r\n  this.res.end('<p>tobi</p>');\r\n})\r\n.pipe(res);\r\n```"}}