Go to file
Ziqiang Li 6109516b32 [refactor] add babel 2017-08-07 22:18:51 +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
index.js [refactor] bump version 1.0.2 2017-08-07 21:56:13 +08:00
package.json [refactor] add babel 2017-08-07 22:18:51 +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);