Created
August 27, 2023 07:37
-
-
Save ramesh-km/6dc4d4e24c441c8ff9fbee81252b42b9 to your computer and use it in GitHub Desktop.
Test CORS
This file contains 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Test CORS</title> | |
</head> | |
<body> | |
<h1>Test CORS</h1> | |
<p>Test CORS</p> | |
<script> | |
// Remote URL | |
fetch('http://localhost:8080/api') | |
.then(res => res.json()) | |
.then(data => console.log(data)) | |
.catch(err => console.log(err)) | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment