I know this is already late, but it is worth mentioning that now you can further capture requests and responses with good :
[requestPayload] - determines whether the request payload will be available to reporter objects. False by default
[responsePayload] - determines whether the response payload will be available to reporter objects. False by default
For instance:
var options = { responsePayload: true, reporters: [{ reporter: require('good-console'), events: { log: '*', response: '*' } }] };
Something needs to be careful, because now you are likely to store the username and passwords in text form in your log files. You should consider using the filter option when registering a response and requesting payloads:
[filter] - an object with the following keys:
- - data property key to change
- value is a string that can be one of the following:
- "censor" - replace the text with "X" s
- "remove" - โโremoves the value of a valid regular string. Supports only one group. Example: "(\ d {4}) $" will replace the last four digits with "X". Be especially careful when creating this line. You will need to make sure that the resulting RegExp object is what you need.
source share