fetch("https://apichallenges.herokuapp.com/mirror/request", {
body: JSON.stringify({ping: Date.now()}),
headers: {
"content-type": "application/json",
"accept": "application/json",
},
method: "POST",
mode: "cors"
}).then(response => {
if(!response.ok) throw new Error(response.statusText);
return response.json();
})