Simple Log For Super Agent
Introduction
An easy and fast way to identify and replicate rogue request on the fly
Dependencies
Logging and debugging for superagent
Install
npm install --save superagent-debugger
Usage
let superagent = ;let superdebug = ;
Output Log
super-curl curl -v -X GET -H 'User-Agent: node-superagent/3.3.2' -H 'Accept: application/json' http://localhost:3000/debug?superdebug=is-awesome +0mssuper-debug HTTP GET 200 http://localhost:3000/debug?superdebug=is-awesome (23ms) +25ms
Using Debug
DEBUG=super-debug,super-curl node sdk.js
options
const options = logName: 'logDebug' curlName: 'curlDebug'
DEBUG=logDebug,curlDebug node sdk.js
Help
Refer to the example provided
Improvement
- Test/Test coverage report
- CI/CD process
- Allow debug for client side request
Any feedbacks or contributions are welcome!