diff --git a/lib/modem.js b/lib/modem.js index c3c3c0c..6e60587 100644 --- a/lib/modem.js +++ b/lib/modem.js @@ -340,7 +340,7 @@ Modem.prototype.buildRequest = function (options, context, data, callback) { debug('Received: %s', result); - var json = utils.parseJSON(result) || result; + var json = utils.parseJSON(result) || buffer; if (finished === false) { finished = true; self.buildPayload(null, context.isStream, context.statusCodes, false, req, res, json, callback);