feat(params): Add params in constructor & change add method
feat(params): Add params in constructor & change add method

1. Now you can add params in constructor
// normal params
const params = new ReqParams();
// set global options
const params = new ReqParams({defaultVal: 'hh'});
// set params
const params = new ReqParams([{name: 'name', option: {type: 'string'}}])
// set params & global options
const params = new ReqParams([{name: 'name', option: {type: 'string'}}], {defaultVal: 'hh'})

2. add method change
// add one param
reqParams.add('name', {type:'string'});
reqParams.add('age', {type:'number'});
// add more params
reqParam.add([{name: 'name', option: {type: 'string'}}, {name:'age', option:{type:'number'}}])

lleohao/restful