Skip to content

Instantly share code, notes, and snippets.

@Marak

Marak/pipeHook.js

Last active Aug 29, 2015
Embed
What would you like to do?
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