request-json
Advanced tools
Comparing version 0.2.0 to 0.2.1
12
main.js
@@ -20,7 +20,11 @@ // Generated by CoffeeScript 1.3.3 | ||
uri: this.host + path | ||
}, function(error, response, data) { | ||
if (typeof data === "string") { | ||
data = JSON.parse(data); | ||
}, function(error, response, body) { | ||
try { | ||
if (typeof data === "string") { | ||
body = JSON.parse(body); | ||
} | ||
return callback(error, response, body); | ||
} catch (err) { | ||
return callback(error, response, body); | ||
} | ||
return callback(error, response, data); | ||
}); | ||
@@ -27,0 +31,0 @@ }; |
@@ -16,3 +16,3 @@ { | ||
], | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"homepage": "https://github.com/mycozycloud/request-json/", | ||
@@ -19,0 +19,0 @@ "bugs": { |
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
3979
49