Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.