Skip to content

Checkson/flex-jsonp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

flex-jsonp

Support Promise For JSONP.

demo

demo

install

npm install flex-jsonp --save

chain usage

flexJsonp({
  url: 'http://suggestion.baidu.com/su',
  params: {
    wd: keywords,
    p: 3,
    t: new Date().getTime()
  },
  callbackParam: 'cb'
}).then(function (res) {
  console.log(res);
}).catch(function (err) {
  console.log(err);
});

parameters

names type default explain
url string '' The url requested by JSONP
params object {} Request parameters
timeout number 0 Request timeout setting
callbackParam string 'cb' JSONP callback function parameter name
callback string 'callback'+${seed} JSONP callback function name

License

MIT

About

A Flex Jsonp Library By Promise

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published