Skip to content

Instantly share code, notes, and snippets.

@shimastripe
Created August 23, 2016 11:09
Show Gist options
  • Save shimastripe/1a5949059239a46bc9aa25e3b1eb231e to your computer and use it in GitHub Desktop.
Save shimastripe/1a5949059239a46bc9aa25e3b1eb231e to your computer and use it in GitHub Desktop.
fetch("http://localhost:8080/api/users?limit=2&last_id=6",
{
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