mockserver-client
Advanced tools
Comparing version 1.0.2 to 1.0.3
{ | ||
"name": "mockserver-client", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"homepage": "https://github.com/jamesdbloom/mockserver-client-node", | ||
@@ -5,0 +5,0 @@ "authors": [ |
17
index.js
@@ -26,5 +26,7 @@ /* | ||
var callback = function (response) { | ||
var body = ''; | ||
var req = http.request(options); | ||
req.once('response', function (response) { | ||
var data = ''; | ||
if (response.statusCode === 400 || response.statusCode === 404) { | ||
@@ -35,3 +37,3 @@ deferred.reject(response.statusCode); | ||
response.on('data', function (chunk) { | ||
body += chunk; | ||
data += chunk; | ||
}); | ||
@@ -42,8 +44,11 @@ | ||
statusCode: response.statusCode, | ||
body: body | ||
body: data | ||
}); | ||
}); | ||
}; | ||
}); | ||
var req = http.request(options, callback); | ||
req.once('error', function (error) { | ||
deferred.reject(error); | ||
}); | ||
req.write(body); | ||
@@ -50,0 +55,0 @@ req.end(); |
{ | ||
"name": "mockserver-client", | ||
"description": "A node client for the MockServer", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"homepage": "https://github.com/jamesdbloom/mockserver", | ||
@@ -6,0 +6,0 @@ "author": { |
@@ -97,3 +97,4 @@ # mockserver-client-node | ||
* 2014-02-11 v1.0.1 Added wercker build process | ||
* 2014-02-21 v1.0.2 Fixed asynchronous errors | ||
* 2014-21-11 v1.0.2 Fixed asynchronous errors | ||
* 2014-04-12 v1.0.3 Improved connection error handling | ||
@@ -100,0 +101,0 @@ --- |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
182981
4485
103