Comparing version 0.7.1 to 0.7.2
@@ -132,15 +132,6 @@ var path = require('path') | ||
var requestBodySize = 0; | ||
var copyTo = 0; | ||
requestBodyBuffers.forEach(function(b) { | ||
requestBodySize += b.length; | ||
}); | ||
requestBody = new Buffer(requestBodySize); | ||
requestBodyBuffers.forEach(function(b) { | ||
b.copy(requestBody, copyTo); | ||
copyTo += b.length; | ||
}); | ||
requestBody = requestBodyBuffers.map(function(buffer) { | ||
return buffer.toString(encoding); | ||
}).join(''); | ||
requestBody = requestBody.toString(); | ||
interceptors = interceptors.filter(function(interceptor) { | ||
@@ -147,0 +138,0 @@ return interceptor.match(options, requestBody); |
@@ -35,3 +35,3 @@ var path = require('path') | ||
var key = method.toUpperCase() + ' ' + basePath + uri; | ||
if (typeof(requestBody) != 'undefined' && typeof(requestBody) !== 'string') { | ||
if (typeof(requestBody) !== 'string') { | ||
try { | ||
@@ -38,0 +38,0 @@ requestBody = JSON.stringify(requestBody); |
{ "name" : "nock" | ||
, "description" : "HTTP Server mocking for Node.js" | ||
, "tags" : ["Mock", "HTTP", "testing", "isolation"] | ||
, "version" : "0.7.1" | ||
, "version" : "0.7.2" | ||
, "author" : "Pedro Teixeira <pedro.teixeira@gmail.com>" | ||
@@ -6,0 +6,0 @@ , "contributors" : |
45652
1333