Last active
August 29, 2015 14:08
-
-
Save Marak/49632e734ac1608d2a7d to your computer and use it in GitHub Desktop.
Pipe Hooks into each other
This file contains 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