jsonp-vue
v0.0.1
Published
A jsonp method return a Promise Object. It can be use in Vue.js
Downloads
4
Readme
install
npm install jsonp-promise
Useage
import jsonp from jsonp-promise
const url = 'http://xxx.com'
jsonp(url,{method: 'encode'},{jsonp: 'callback', callback: 'render'}).then(res=>{console.log(res)})
Above code will fetch http://xxx.com?method=encode&callback=render
Parameters
- url The base url such as: 'http:www.google.com'
- params location.search
- options