Created
October 20, 2018 17:57
-
-
Save Luciushy/f894bfeeea82b608ebb973a2ff345bd4 to your computer and use it in GitHub Desktop.
jeKZLY
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
<div id="container"></div> |
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
var url = 'https://newsapi.org/v2/top-headlines?' + | |
'country=us&' + | |
'apiKey=f19b9ed0e82446e59b104db20eb85d65'; | |
var req = new Request(url); | |
fetch(req) | |
.then(function(response) { | |
console.log(response.json()); | |
}) |
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
body{ | |
margin:0; | |
} | |
#container{ | |
display:flex; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment