Comparing version 0.0.5 to 0.0.6
19
index.js
@@ -70,2 +70,6 @@ /** | ||
this.retry = function () { | ||
return this.send(this.data); | ||
}; | ||
this.send = function (data) { | ||
@@ -78,2 +82,3 @@ var self = this, | ||
this.started = true; | ||
this.data = data; | ||
@@ -125,2 +130,4 @@ if (data && this.method === 'GET') { | ||
self.headers = response.headers; | ||
if (self._raw) { | ||
@@ -130,3 +137,3 @@ if (response.statusCode === 200) { | ||
logger.log('silly', s); | ||
self.cb(null, s, response.headers, self.additional_arguments); | ||
self.cb(null, s, self, self.additional_arguments); | ||
} | ||
@@ -138,3 +145,3 @@ else { | ||
}; | ||
self.cb(s, null, response.headers, self.additional_arguments); | ||
self.cb(s, null, self, self.additional_arguments); | ||
} | ||
@@ -157,6 +164,6 @@ } | ||
e.statusCode = response.statusCode; | ||
return self.cb(e, s, response.headers, self.additional_arguments); | ||
return self.cb(e, s, self, self.additional_arguments); | ||
} | ||
if (response.statusCode === 200) { | ||
self.cb(null, JSON.parse(s), response.headers, self.additional_arguments); | ||
self.cb(null, JSON.parse(s), self, self.additional_arguments); | ||
} | ||
@@ -166,3 +173,3 @@ else { | ||
s.statusCode = response.statusCode; | ||
self.cb(s, null, response.headers, self.additional_arguments); | ||
self.cb(s, null, self, self.additional_arguments); | ||
} | ||
@@ -180,3 +187,3 @@ } | ||
self.cb(err, null, null, self.additional_arguments); | ||
self.cb(err, null, self, self.additional_arguments); | ||
}); | ||
@@ -183,0 +190,0 @@ |
{ | ||
"name": "cuddle", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
21465
217