Fetch API error test
by cferdinandi
JavaScript
fetch('https://jsonplaceholder.typicode.com/postses')
.then(function (response) {
return response.json();
})
.then(function (data) {
console.log('success', data);
})
.catch(function (error) {
console.log('error', error);
});