if ('number' != typeof argumentsObj[0] && 'number' == typeof argumentsObj[1]) {
statusCode = argumentsObj[1];
body = _getBody(argumentsObj[0]);
} else {
statusCode = argumentsObj[0];
body = _getBody(argumentsObj[1]);
}
data.body = body;
data.status = statusCode;
} else {
if (helpers.isNumber(argumentsObj[0])) {
statusCode = argumentsObj[0];
data.body = statusCode;
data.status = statusCode;
} else {
body = _getBody(argumentsObj[0]);
data.body = body;
data.status = statusCode;
}
}
return data;
};
var _captureRenderData = function (argumentsObj) {
var body, data = {};
if (argumentsObj.length >= 2 && helpers.isObject(argumentsObj[1])) {
data.body = helpers.extend({}, argumentsObj[1]);
} else {
data.body = {};
}
return data;
};
this.getResponseData = _captureResponseData;
this.getRenderData = _captureRenderData;
this.proxyResponseObject = function (res) {
var responseJsonSend = res.json,
responseJsonpSend = res.jsonp,
responseSend = res.send,
responseRedirect = res.redirect,
responseRender = res.render,
responseSendfile = res.sendfile,
responseDownload = res.download;
var parsedResponseData = {};