mattwilliamson
10/30/2014 - 8:24 PM

Echo HTTP requests

Echo HTTP requests

module['exports'] = function echoHttp (hook) {

  hook.debug("Debug messages are sent to the debug console");

  hook.debug(hook.params);

  hook.debug(hook.req.path);

  hook.debug(hook.req.method);

  hook.res.end(JSON.stringify(hook.params, true, 2));

};