fix request options

This commit is contained in:
Matthias Kretschmann 2017-06-28 20:14:43 +02:00
parent d09f175ccd
commit 074de3aca0
Signed by: m
GPG Key ID: 606EEEF3C479A91F
1 changed files with 5 additions and 5 deletions

View File

@ -20,12 +20,12 @@ const handleResponse = res => {
return res.json()
}
// Request headers for all fetch calls
const headers = [{
// Request options for all fetch calls
const options = {
headers: {
Accept: 'application/vnd.github.preview'
}
}]
}
//
// Fetch all public GitHub repos
@ -34,7 +34,7 @@ const fetchRepos = () => {
const start = Date.now()
const url = 'https://api.github.com/orgs/' + orgname + '/repos'
fetch(url, headers)
fetch(url, options)
.then(res => {
return handleResponse(res)
})
@ -79,7 +79,7 @@ const fetchReleases = () => {
const start = Date.now()
const url = 'https://api.github.com/repos/bigchaindb/' + reponame + '/releases/latest'
fetch(url, headers)
fetch(url, options)
.then(res => {
return handleResponse(res)
})