Created
August 23, 2016 11:07
-
-
Save shimastripe/8a868678ee1ed3a5dc09c310c9f3aaea to your computer and use it in GitHub Desktop.
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
fetch("http://localhost:8080/api/users?limit=2", | |
{ | |
headers: { | |
'Accept': 'application/json', | |
'Content-Type': 'application/json' | |
}, | |
method: "GET" | |
}) | |
.then(function(res){ console.log(res.headers.get('Link')); return res.json(); }) | |
.then(function(json){console.log(json);}) | |
.catch(function(res){ console.log(res); }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment