We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bd50685 commit 77a024aCopy full SHA for 77a024a
1 file changed
Readme.md
@@ -149,6 +149,18 @@ form.submit({
149
});
150
```
151
152
+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()`:
153
+
154
+``` javascript
155
+form.submit({
156
+ host: 'example.com',
157
+ path: '/surelynot.php',
158
+ headers: {'x-test-header': 'test-header-value'}
159
+}, function(err, res) {
160
+ console.log(res.statusCode);
161
+});
162
+```
163
164
## Notes
165
166
- ```getLengthSync()``` method DOESN'T calculate length for streams, use ```knownLength``` options as workaround.
0 commit comments