I have a webapp that I created in polymer 1 that uses iron-ajax to get data from the server. I am going to be redoing the webapp in polymer 3 and would like to know. Should I still use iron-ajax or is there a better resource to use?
iron-ajax
已升级为聚合物 3,它与聚合物 3 一起使用效果很好,为什么要替换它
You can use native Fetch api
fetch('http://example.com/movies.json')
.then(function(response) {
return response.json();
})
.then(function(myJson) {
console.log(JSON.stringify(myJson));
});
Or external libraries such as axios
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.