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.
npm install log-that-httpVerified import paths — ran on the pinned version, not inferred.
Shows activating log-that-http with env vars and making a simple HTTP GET request. Logs request/response headers and body automatically.
Use only on Node.js 8–13 or test with your specific library.
Consider alternatives like 'pino-http' or 'morgan' for active logging solutions.
Load log-that-http first, before other http-modifying libraries.
Set LOG_THAT_HTTP_HEADERS and LOG_THAT_HTTP_BODY before require('log-that-http').Run 'npm install log-that-http' and use require('log-that-http').Use process.env.LOG_THAT_HTTP_HEADERS = 'true' before require.
Upgrade to a maintained logger or restrict Node version to <14.
No dependency data recorded yet.