1.2.2 • Published 4 years ago
i2233 v1.2.2
Install
npm install i2233 --save
Quick Start
promise style
const i2233 = require('i2233')
i2233(1, {
ps: 1,
rid: 1
}).then(value => {
console.log(value)
})
callback style
Notice: i2233() will always return a promise, whether there is a callback or not.
const i2233 = require('i2233')
i2233(1, {
ps: 1,
rid: 1
}, value => {
console.log(value)
})
both
const i2233 = require('i2233')
i2233(1, {
ps: 1,
rid: 1
}, value => {
console.log(value)
}).then(value => {
console.log(value)
})
configure
i2233(code: number, config: object, cb: function)
More code
and config
can be found here.
As examples above, just passing a simple key/value object is OK. i2233 will analyze which part these configuration belongs to(query, header, body).