core of cute curl
https://github.com/apporoad/cute.curl.js
npm i -g aok.js
aok test -p 19999
node test
npm i -S cute.curl.core
var ccurl = require('cute.curl.core')
curl.invoke(['http://localhost:19999/123' , 'post' , { abc :'hello', yes : 1} , ''], {
headers: ['asdf:a' , 'ccc:222'],
verbose : false,
//defaultMethod , useful when no method
defaultMethod : 'post',
// force method
method : 'get',
preInvoke : function(invokeObj){
console.log(invokeObj.url)
console.log(invokeObj.data)
console.log(invokeObj.method)
console.log(invokeObj.options)
invokeObj.data['abc'] = 'yyyyyy'
}
})