-
-
Save lucastex/536a55b10f5daea2dd38 to your computer and use it in GitHub Desktop.
Pipe Hooks into each other
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module['exports'] = function pipeHook (hook) { | |
hook.debug('Opening echo hook with some data'); | |
var hook2 = hook.open('http://hook.io/Marak/echo?foo=bar'); | |
hook2.write('hello!'); | |
hook2.pipe(hook.res); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment