Fix #15, Support multipart post.

This commit is contained in:
Miao Jiang 2013-04-10 03:09:25 +08:00
parent e318a72006
commit 9c1cbb81c9
10 changed files with 239 additions and 30 deletions

View file

@ -0,0 +1,27 @@
// Generated by ToffeeScript 1.6.2
(function() {
var curl, p;
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'
}
]
}, function(e) {
console.log(e);
return console.log(curl.body);
});
}).call(this);