1.0.0 • Published 7 years ago
cross-jsonp v1.0.0
jsonp
Can be used to solve the mainstream browser cross domain data access problems
how to use it
npm install cross-jsonp --save-dev
import getJsonpData from 'cross-jsonp';
getJsonpData(url,data).then(response=>{
console.log(response);
})
params
name | description | |
---|---|---|
url | (String) url to fetch | |
data | name of the query string parameter to | |
timeout | (Number) how long after a timeout error is emitted. 0 to disable (defaults to 10000) | |
callbackName | (String) name of the global callback functions that handle jsonp responses |