Socket
Socket
Sign inDemoInstall

wpcom-xhr-request

Package Overview
Dependencies
Maintainers
2
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wpcom-xhr-request - npm Package Compare versions

Comparing version 0.1.0 to 0.2.0

examples/browser/freshly-pressed.html

6

History.md
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"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc