request-json
Advanced tools
Comparing version 0.4.11 to 0.4.12
13
main.js
@@ -241,2 +241,15 @@ // Generated by CoffeeScript 1.7.1 | ||
JsonClient.prototype.putFile = function(path, file, data, callback) { | ||
var req; | ||
if (typeof data === "function") { | ||
callback = data; | ||
} | ||
req = this.put(path, null, callback, false); | ||
if (typeof file === "string") { | ||
return fs.createReadStream(file).pipe(req); | ||
} else if (!Array.isArray(file)) { | ||
return file.pipe(req); | ||
} | ||
}; | ||
JsonClient.prototype.saveFile = function(path, filePath, callback) { | ||
@@ -243,0 +256,0 @@ var stream; |
@@ -20,3 +20,3 @@ { | ||
], | ||
"version": "0.4.11", | ||
"version": "0.4.12", | ||
"homepage": "https://github.com/mycozycloud/request-json/", | ||
@@ -31,2 +31,3 @@ "bugs": { | ||
"Dario Kondratiuk", | ||
"David Neal", | ||
"Frank Rousseau", | ||
@@ -33,0 +34,0 @@ "Alan Plum", |
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
13506
245