Added Accumulate-request in plugins sequence.
plugins:
sequence:
- oauth
- accumulate-request
- bunyan-logger
In bunyan-logger plugin implemented the onend_request as follows:
onend_request: function(req, res, data, next) {
log.debug('REQUEST PAYLOAD : ' + data.toString());
next(null, data); },
When i run the test, it accumulates once and fails to do the same again. The json request is not complete and the data passed to backend fails because of json parsing issue. When i run again the complete request goes in and works fine. Why is this inconsistent?
Do you have any suggestions if the implementation to include accumulate-request is not done properly?
I don't think the "data" variable passes from one plugin to another. Why not combine the logic of accumulate-request and bunyan-logger into one plugin (bunyan-logger)?
User | Count |
---|---|
7 | |
2 | |
2 | |
2 | |
1 |