fetch在浏览器中使用
在 Chrome 浏览器中已经全局支持了 fetch 函数,打开调试工具,在 Console 中可以进行体验下fetch。先不考虑跨域请求的使用方法,我们先请求同域的资源。...例如:
fetch('http://nero-zou.com/test', {
method: 'GET'
}).then(function(response) {
//获取数据,数据处理...0044b4cebe650ada958da3458f51eae833656.png"
},
{
typeface_color: "#f6687d",
position: 0,
module: false,
maintitle: "电影特惠...",
type: 1,
deputytitle: "神奇女侠",
solds: 0,
id: 19749,
share: {
message: "热门大片特惠,福利再来一波>>",
url: "http...://i.meituan.com/firework/km1495594906"
},
title: "电影特惠",
deputy_typeface_color: "#c280fc",
tplurl: "