diff --git a/modules/engine/lib/engine/http.request.js b/modules/engine/lib/engine/http.request.js index 948c6305..dc28f496 100644 --- a/modules/engine/lib/engine/http.request.js +++ b/modules/engine/lib/engine/http.request.js @@ -409,6 +409,16 @@ function sendOneRequest(args, resourceUri, params, holder, cb) { } if(res.statusCode >= 200 && res.statusCode <= 300) { if(respJson) { + if(resource.monkeyPatch && resource.monkeyPatch['patch response']) { + try { + respJson = resource.monkeyPatch['patch response']({ + body: respJson + }); + } + catch(e) { + return httpReqTx.cb(e); + } + } // Projections project.run(resource.resultSet, statement, respJson, function(filtered) { return httpReqTx.cb(undefined, {