代码看起来像这样,不知道如何读取响应数据.任何的想法?.
var url = 'http://www.bbc.co.uk/sport/football';
fetch(url, {
mode : 'no-cors'
}).then(function(response) {
console.log(response);
});
Run Code Online (Sandbox Code Playgroud)
小智 -5
使用以下其中一项,具体取决于您期望的数据:
response.blob()
response.text()
response.formData()
response.json()
response.arrayBuffer()
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
6429 次 |
| 最近记录: |