request-json
Advanced tools
Comparing version 0.2.2 to 0.2.3
13
main.js
@@ -55,2 +55,15 @@ // Generated by CoffeeScript 1.3.3 | ||
JsonClient.prototype.sendFile = function(path, filePath, callback) { | ||
var form, req; | ||
req = request.post("" + this.host + path, callback); | ||
form = req.form(); | ||
return form.append('file', fs.createReadStream(filePath)); | ||
}; | ||
JsonClient.prototype.saveFile = function(path, filePath, callback) { | ||
var stream; | ||
stream = client.getFile(path, callback); | ||
return stream.pipe(fs.createWriteStream(filePath)); | ||
}; | ||
return JsonClient; | ||
@@ -57,0 +70,0 @@ |
@@ -16,3 +16,3 @@ { | ||
], | ||
"version": "0.2.2", | ||
"version": "0.2.3", | ||
"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
4434
60