Created
October 15, 2023 09:00
-
-
Save Aschen/9edf721cd817f26c96a834d83030b64f to your computer and use it in GitHub Desktop.
WebHook development: HTTP echo server
This file contains 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
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