Skip to content

Commit

Permalink
fix: add accept header
Browse files Browse the repository at this point in the history
  • Loading branch information
knownasilya authored Mar 30, 2018
1 parent dcc3128 commit fe7fb79
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ module.exports = {

function getApps(aid, token, done) {
superagent.get(API + '/apps')
.set('Accept', 'application/vnd.heroku+json; version=3')
.set('Authorization', 'Bearer ' + token)
.end(function (res) {
if (res.status !== 200) return done(new Error('Status: ' + res.status + '; ' + res.text))
Expand All @@ -27,6 +28,7 @@ function getApps(aid, token, done) {

function addKey(token, key, done) {
superagent.post(API + '/user/keys')
.set('Accept', 'application/vnd.heroku+json; version=3')
.set('Authorization', 'Bearer ' + token)
.set('Content-type', 'text/ssh-authkey')
.send(key)
Expand Down

0 comments on commit fe7fb79

Please sign in to comment.