Skip to content

Instantly share code, notes, and snippets.

@Marak
Last active August 29, 2015 14:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save Marak/49632e734ac1608d2a7d to your computer and use it in GitHub Desktop.
Save Marak/49632e734ac1608d2a7d to your computer and use it in GitHub Desktop.
Pipe Hooks into each other
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