Fix #15, Support multipart post.
This commit is contained in:
parent
e318a72006
commit
9c1cbb81c9
10 changed files with 239 additions and 30 deletions
12
examples/post-multi-part.toffee
Normal file
12
examples/post-multi-part.toffee
Normal file
|
@ -0,0 +1,12 @@
|
|||
curl = require '../index'
|
||||
p = console.log
|
||||
p 'start'
|
||||
|
||||
curl '127.0.0.1/upload.php', {
|
||||
multipart: [
|
||||
{name: 'file', file: '/home/miao/test.js', type: 'text/html'},
|
||||
{name: 'sumbit', value: 'send'}
|
||||
],
|
||||
}, (e) ->
|
||||
console.log e
|
||||
console.log curl.body
|
Loading…
Add table
Add a link
Reference in a new issue