- 授权协议: MIT
- 开发语言: JavaScript
- 操作系统: 跨平台
- 软件首页: https://github.com/fetch-extras/fetch-jsonp-polyfill
- 软件文档: https://github.com/fetch-extras/fetch-jsonp-polyfill
- 官方下载: https://github.com/fetch-extras/fetch-jsonp-polyfill
软件介绍
fetch-jsonp-polyfill 是对原生 Fetch API 的扩展,使之支持 jsonp。
下载地址 https://github.com/fetch-extras/fetch-jsonp-polyfill
几乎所有主流的 jsonp polyfill 库兼容,如https://github.com/github/fetch、https://github.com/matthew-andrews/isomorphic-fetch 、https://github.com/bitinn/node-fetch
安装
使用 npm
npm install fetch-jsonp-polyfill --save-dev
引用
require('isomorphic-fetch')
require('fetch-jsonp-polyfill')
or
import 'whatwg-fetch'
import 'fetch-jsonp-polyfill'
使用
fetch('http://jsfiddle.net/echo/jsonp/?hello=world', {
method: "JSONP"
})
.then(res => res.json())
.then(data => {
console.log(data);
})
.catch(err => {
console.log(err);
})
其它选项
fetch(URL, {
method: 'JSONP',
timeout: 5000,
callback: 'callback',
callbackName: 'fetchjsonp_callback',
})
浏览器支持
| Latest ✔ | Latest ✔ | 9+ ✔ | Latest ✔ | 6.1+ ✔ |
电商运营之道:策略、方法与实践
吴伟定、姚金刚、周振兴、郑琰 / 机械工业出版社 / 2015-9-1 / 49
电商运营之道:策略、方法与实践是一本电商的运营指南,适合所有的电商从业人员阅读,也适合打算进入或打算在电商行业创业的读者朋友阅读。分别从策略、方法与实践三个方面全景式展示电商运营的内在商业规律与管理逻辑。一起来看看 《电商运营之道:策略、方法与实践》 这本书的介绍吧!
