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
// GET Boilerplate | |
const xhr = new XMLHttpRequest(); // xhr is XMLHttpRequest. This line creates a new object | |
const url = 'http://api-to-call.com/endpoint'; | |
xhr.responseType = 'json'; // response type to json //these 6 lines handle response | |
xhr.onreadystatechange = function() { // event handler that is called whenever the value of the readyStateproperty changes. | |
if (xhr.readyState === XMLHttpRequest.DONE) { | |
console.log(xhr.response); | |
} |
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
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css"/> | |
<div class="container-fluid main"> | |
<div class="well" id="well"> | |
<div class="nav"> | |
<ul> | |
<li><a href="#">Home</a></li> | |
<li><a href="#">About</a></li> | |
<li><a href="#">Contact</a></li> | |
</ul> |