Created
August 31, 2015 05:01
-
-
Save Marak/d37824280f8fb9ee6861 to your computer and use it in GitHub Desktop.
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 echoHttp (hook) { | |
if (!hook.streaming) { | |
return hook.res.end('No streaming request detected.'); | |
} | |
hook.req.on('end', function(){ | |
hook.res.end(); | |
}); | |
hook.req.on('data', function(chunk){ | |
hook.res.write(chunk.toString()) | |
}); | |
}; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment