diff --git a/lib/modem.js b/lib/modem.js index b5f4cfd..7323e8a 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);