get方式获取json
fetch('user/all').then(function(data){data.json().then(function(items){for(var item of items){console.log(item.id+'\t'+item.name)}})});
get方式获取json
fetch('user/all').then(function(data){data.json().then(function(items){for(var item of items){console.log(item.id+'\t'+item.name)}})});
转载于:https://my.oschina.net/starryard/blog/876070