From fe7fb79a69fa611c1076f27f17062203eaea4a84 Mon Sep 17 00:00:00 2001 From: Ilya Radchenko Date: Fri, 30 Mar 2018 10:32:37 -0400 Subject: [PATCH] fix: add accept header --- lib/api.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/api.js b/lib/api.js index 9a7de59..8a52e09 100644 --- a/lib/api.js +++ b/lib/api.js @@ -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)) @@ -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)