wpcom-xhr-request
Advanced tools
Comparing version 0.1.0 to 0.2.0
0.2.0 / 2014-04-30 | ||
================== | ||
* pkg: bump superagent@0.18.0 | ||
* index: check for `params.formData` object | ||
0.1.0 / 2014-04-22 | ||
@@ -3,0 +9,0 @@ ================== |
14
index.js
@@ -66,3 +66,3 @@ | ||
// POST API request body | ||
if ('post' == method && params.body) { | ||
if (params.body) { | ||
req.send(params.body); | ||
@@ -73,4 +73,12 @@ debug('API send POST body: ', params.body); | ||
// XXX: delete this... | ||
debug('unused API params: ', params); | ||
// POST FormData (for `multipart/form-data`, usually a file upload) | ||
if (params.formData) { | ||
for (var i = 0; i < params.formData.length; i++) { | ||
var data = params.formData[i]; | ||
var key = data[0]; | ||
var value = data[1]; | ||
debug('adding FormData field "%s"', key); | ||
req.field(key, value); | ||
} | ||
} | ||
@@ -77,0 +85,0 @@ // start the request |
@@ -12,3 +12,3 @@ { | ||
], | ||
"version": "0.1.0", | ||
"version": "0.2.0", | ||
"author": "Automattic, Inc.", | ||
@@ -26,4 +26,4 @@ "contributors": [ | ||
"debug": "0.8.0", | ||
"superagent": "0.17.0" | ||
"superagent": "0.18.0" | ||
} | ||
} |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
6162
99
1
+ Addedasync@0.2.10(transitive)
+ Addedcombined-stream@0.0.7(transitive)
+ Addedcomponent-emitter@1.1.2(transitive)
+ Addedcookiejar@1.3.2(transitive)
+ Addedcore-util-is@1.0.3(transitive)
+ Addeddelayed-stream@0.0.5(transitive)
+ Addedform-data@0.1.2(transitive)
+ Addedinherits@2.0.4(transitive)
+ Addedisarray@0.0.1(transitive)
+ Addedmime@1.2.11(transitive)
+ Addedqs@0.6.6(transitive)
+ Addedreadable-stream@1.0.27-1(transitive)
+ Addedstring_decoder@0.10.31(transitive)
+ Addedsuperagent@0.18.0(transitive)
- Removedcookiejar@1.3.0(transitive)
- Removedemitter-component@1.0.0(transitive)
- Removedqs@0.6.5(transitive)
- Removedsuperagent@0.17.0(transitive)
Updatedsuperagent@0.18.0