Skip to content

Commit 55855e4

Browse files
committed
Add convenient submit() interface
1 parent b959b6a commit 55855e4

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

Readme.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,12 @@ request.on('response', function(res) {
4646
});
4747
```
4848

49+
Or if you would prefer the `'Content-Length'` header to be set for you:
50+
51+
``` javascript
52+
form.submit('example.org/upload', function(err, res) {
53+
console.log(res.statusCode);
54+
});
55+
```
56+
4957
[xhr2-fd]: http://dev.w3.org/2006/webapi/XMLHttpRequest-2/Overview.html#the-formdata-interface

0 commit comments

Comments
 (0)