Skip to content

Commit

Permalink
Let's see...
Browse files Browse the repository at this point in the history
  • Loading branch information
awlayton committed Apr 3, 2015
1 parent bb82972 commit 84e0e3e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,13 @@ module.exports = function register(metadata, endpoint, callback, token) {
.accept('application/json')
.send(params);

if (token) { req.set('Authorization', token.replace(/\n/, '')); }
if (token) {
req.set('Authorization', token.replace(/\n/, ''));
}

if (typeof req.buffer === 'function') { req.buffer(); }
if (typeof req.buffer === 'function') {
req.buffer();
}

req.end(function handleResponse(err, resp) {
err = resp.error || err;
Expand Down

0 comments on commit 84e0e3e

Please sign in to comment.