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 logParser (hook) { | |
if (hook.req._readableState.endEmitted === true) { | |
// | |
// If hook.req.end has already been emitted, the request has already been recieved and fully bufferred | |
// In order to stream data you must open a streaming request ( not a browser GET request ) | |
// | |
// To test a streaming Hook you can use Curl: | |
// | |
// echo "foo" | curl -X POST --data-binary @- http://hook.io/Marak/transform |