Last active
June 11, 2018 16:02
-
-
Save trueheart78/a223468aa51179d364d258012dd36398 to your computer and use it in GitHub Desktop.
API Gateway - Taylor Showtime 2018
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>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