Socket
Socket
Sign inDemoInstall

form-data

Package Overview
Dependencies
Maintainers
5
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

form-data - npm Package Compare versions

Comparing version 0.1.2 to 0.1.3

6

lib/form_data.js

@@ -258,4 +258,3 @@ var CombinedStream = require('combined-stream');

, defaults = {
method : 'post',
headers: this.getHeaders()
method : 'post'
};

@@ -283,2 +282,5 @@

// put that good code in getHeaders to some use
options.headers = this.getHeaders(params.headers);
// https if specified, fallback to http in any other case

@@ -285,0 +287,0 @@ if (params.protocol == 'https:') {

@@ -5,3 +5,3 @@ {

"description": "A module to create readable \"multipart/form-data\" streams. Can be used to submit forms and file uploads to other web applications.",
"version": "0.1.2",
"version": "0.1.3",
"repository": {

@@ -16,3 +16,3 @@ "type": "git",

"engines": {
"node": ">= 0.6"
"node": ">= 0.8"
},

@@ -22,3 +22,3 @@ "dependencies": {

"mime": "~1.2.11",
"async": "~0.2.9"
"async": "~0.9.0"
},

@@ -35,4 +35,4 @@ "licenses": [

"formidable": "~1.0.14",
"request": "~2.27.0"
"request": "~2.36.0"
}
}

@@ -152,2 +152,14 @@ # Form-Data [![Build Status](https://travis-ci.org/felixge/node-form-data.png?branch=master)](https://travis-ci.org/felixge/node-form-data) [![Dependency Status](https://gemnasium.com/felixge/node-form-data.png)](https://gemnasium.com/felixge/node-form-data)

In case you need to also send custom HTTP headers with the POST request, you can use the `headers` key in first parameter of `form.submit()`:
``` javascript
form.submit({
host: 'example.com',
path: '/surelynot.php',
headers: {'x-test-header': 'test-header-value'}
}, function(err, res) {
console.log(res.statusCode);
});
```
## Notes

@@ -154,0 +166,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