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?