0.0.1 • Published 7 years ago
jsonp-vue v0.0.1
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
0.0.1
7 years ago