Source Code

These examples can be run directly in the browser or from any client which speaks HTTP.
You can also send data using tools like cURL.


module['exports'] = function transformStream (hook) {
  // If the hook is not currently streaming, 
  // the req has already been fully buffered,
  // and can no longer be streamed!
  if (!hook.streaming) {
    return hook.res.end('No streaming request detected. \n\nTo test streaming data to this Hook try running this Curl command: \n\n     echo "foo" | curl --header "content-type: application/octet-stream"  --data-binary @-');
  hook.req.on('end', function(){
  hook.req.on('data', function(chunk){
    hook.res.write('transformed-' + chunk.toString())

To make your own copy of this service or "Fork" it simply click the button. You will need to register for a Free Account, but it's very quick and easy!