Basic fetch example
by Dhanck
HTML
<input type="button" id="basicFetchButton" value="Try it">
JavaScript
document.getElementById("basicFetchButton").addEventListener("click", function(){
// Loading the jQuery code
fetch("https://prod.api.modist.twg.ca/api/v1")
.then(function (response) {
response.text().then(function (responseText) {
console.log(responseText);
alert("Done using Fetch!");
});
});
});