Skip to content

Instantly share code, notes, and snippets.

@trueheart78
Last active June 11, 2018 16:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trueheart78/a223468aa51179d364d258012dd36398 to your computer and use it in GitHub Desktop.
Save trueheart78/a223468aa51179d364d258012dd36398 to your computer and use it in GitHub Desktop.
API Gateway - Taylor Showtime 2018
<html>
<head>
<title>TimeToTaylor</title>
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.1.1/css/bootstrap.css" rel="stylesheet" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.js"></script>
<script>
var xhr = new XMLHttpRequest();
var obj = null;
xhr.open('GET', 'https://gvitovaif0.execute-api.us-east-2.amazonaws.com/development/showtime');
xhr.onreadystatechange = function(event) {
obj = JSON.parse(event.target.response);
$('#showtime').html(obj.showtime);
$('#time_to_show').html(obj.time_to_show);
}
xhr.send();
</script>
</head>
<body>
<div align="center" class="alert alert-info">
<div id="showtime">Taylor Swift</div>
<div id="time_to_show">💖</div>
<div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment