ie是完全不支持fetch的。

fetch(url,{method:"get/post"}).then(res=>{   })

SRE实战 互联网时代守护先锋,助力企业售后服务体系运筹帷幄!一键直达领取阿里云限量特价优惠。

如果请求返回的status是200,body是ReadableStream那么,就要使用json()方法转换

 ES6使用fetch请求数据 随笔

 

例子:

fetch("http://jsonplaceholder.typicode.com/users").then(response => response.json()).then(res=>{
            console.log(res);
        })

 

扫码关注我们
微信号:SRE实战
拒绝背锅 运筹帷幄