Last active
February 23, 2023 20:13
-
-
Save nidhi-canopas/2e2b1f18bed5f93ecb2ddcd6977d1ebf to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>Demo</title> | |
</head> | |
<body> | |
<p>Welcome to CORS demo</p> | |
<script type="text/javascript"> | |
async function invokeAPI() { | |
var result = await fetch('http://localhost:3000/ping') | |
.then(response => response.json()); | |
console.log(result) | |
} | |
window.onload = invokeAPI(); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment