Go to file
Ziqiang Li 6f0b378c19 [fix] bump 2017-12-11 14:20:49 +08:00
build [fix] bump 2017-12-11 14:20:49 +08:00
src [fix] bump 2017-12-11 14:20:49 +08:00
.babelrc [refactor] add babel 2017-08-07 22:18:51 +08:00
.gitignore [feat] promise based jsonp 2017-08-07 20:24:25 +08:00
LICENSE Initial commit 2017-08-07 20:12:52 +08:00
README.md [feat] promise based jsonp 2017-08-07 20:24:25 +08:00
package.json [fix] bump 2017-12-11 14:20:49 +08:00
yarn.lock [refactor] add yarn lock file 2017-08-07 22:19:50 +08:00

README.md

simple-jsonp-promise

Installation

yarn add simple-jsonp-promise

Example

import jsonp from 'simple-jsonp-promise'
let options = {
        params:{
            a : 1,
            b : 2
        },
        jsonp : 'callback',
        prefix : '__jp',
        timeout : 15000
    }
let response = await jsonp('https://localhost/api.jsonp' , options);