Comparing version 0.1.2 to 0.1.3
@@ -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 @@ |
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
15524
261
176
+ Addedasync@0.9.2(transitive)
- Removedasync@0.2.10(transitive)
Updatedasync@~0.9.0