Testing 5
This commit is contained in:
parent
ca30189c64
commit
b30caa1c60
@ -6,10 +6,10 @@ window.onload = async function() {
|
|||||||
if (!response.ok) {
|
if (!response.ok) {
|
||||||
throw new Error('Network response was not ok');
|
throw new Error('Network response was not ok');
|
||||||
}
|
}
|
||||||
return response.json(); // Parse the JSON data from the response
|
|
||||||
})
|
})
|
||||||
.then(data => {
|
.then(data => {
|
||||||
console.log(data); // Use the JSON data here
|
console.log(data); // Use the JSON data here
|
||||||
|
return data;
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
console.error('There was a problem with the fetch operation:', error);
|
console.error('There was a problem with the fetch operation:', error);
|
||||||
|
Loading…
Reference in New Issue
Block a user