{"library":"log-that-http","title":"log-that-http","description":"Monkey-patches Node.js built-in http/https modules to log outgoing requests and responses to console. v1.0.1 is the current stable release; last updated in 2019. No dependencies, supports Node >=8. Works transparently with axios, got, node-fetch, request, superagent, and native http/https. Controlled via environment variables (LOG_THAT_HTTP_HEADERS, LOG_THAT_HTTP_BODY). Not actively maintained, but functional for debugging. Contrasts with request-intercepting libraries like nock or mockttp by focusing on logging without mocking.","language":"javascript","status":"maintenance","last_verified":"Sat Apr 25","install":{"commands":["npm install log-that-http"],"cli":null},"imports":["require('log-that-http')","process.env.LOG_THAT_HTTP_HEADERS = 'true'","process.env.LOG_THAT_HTTP_BODY = 'true'"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"// Enable via environment variables before requiring the package\nprocess.env.LOG_THAT_HTTP_HEADERS = 'true';\nprocess.env.LOG_THAT_HTTP_BODY = 'true';\n\nrequire('log-that-http');\n\nconst http = require('http');\nhttp.get('http://example.com', (res) => {\n  let data = '';\n  res.on('data', chunk => data += chunk);\n  res.on('end', () => console.log('Done'));\n}).on('error', console.error);","lang":"javascript","description":"Shows activating log-that-http with env vars and making a simple HTTP GET request. Logs request/response headers and body automatically.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}