Skip to content

Instantly share code, notes, and snippets.

@Aschen
Created October 15, 2023 09:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Aschen/9edf721cd817f26c96a834d83030b64f to your computer and use it in GitHub Desktop.
Save Aschen/9edf721cd817f26c96a834d83030b64f to your computer and use it in GitHub Desktop.
WebHook development: HTTP echo server
node -e "const h = require('http');const s = h.createServer();const l = console.log;s.on('request', (rq, rs) => {let b = [];rq.on('data', (c) => {b.push(c);}).on('end', () => {b = Buffer.concat(b).toString();l('==== '+rq.method+' '+rq.url);l('> Headers');l(rq.headers);l('> Body');l(b);rs.end();});}).listen(8000);"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment