Skip to content
This repository has been archived by the owner on Apr 27, 2023. It is now read-only.

Commit

Permalink
send accept header
Browse files Browse the repository at this point in the history
  • Loading branch information
mike182uk committed Jan 10, 2016
1 parent 58b94d8 commit f37d14b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ function fetchPageOfGists(page, accessToken) {
url: 'https://api.github.com/gists',
headers: {
'User-Agent': 'fetch-gists',
accept: 'application/vnd.github.v3+json',
},
qs: {
page: page,
Expand Down
3 changes: 2 additions & 1 deletion test.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,8 @@ function mockGetGistsApiCall (page, body, isLastPage, statusCode) {
}

var reqHeaders = {
'User-Agent': 'fetch-gists'
'User-Agent': 'fetch-gists',
accept: 'application/vnd.github.v3+json',
}

nock('https://api.github.com', { reqheaders: reqHeaders })
Expand Down

0 comments on commit f37d14b

Please sign in to comment.