File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -83,7 +83,7 @@ var request = require('request'),
83
83
84
84
// Give each request an id so we can identify the response
85
85
var rack = hat . rack ( ) ,
86
- requestId = options . requestId || 'Batchelor_' + rack ( ) ;
86
+ requestId = options . requestId || 'Batchelor_' + rack ( ) ;
87
87
88
88
// Save out request specific callback
89
89
if ( ! ! options . callback ) {
@@ -135,6 +135,11 @@ var request = require('request'),
135
135
'body' : requestPart . method + ' ' + requestPart . path + '\n'
136
136
} ;
137
137
138
+ // Check if this part needs it's own auth
139
+ if ( ( ! ! requestPart . auth ) && ( ! ! requestPart . auth . bearer ) ) {
140
+ requestSettings . body += 'Authorization: Bearer ' + requestPart . auth . bearer + '\n' ;
141
+ }
142
+
138
143
// Replace body with a request if this isn't a GET
139
144
if ( requestPart . method !== 'GET' ) {
140
145
requestSettings . body = requestPart . method + ' ' + requestPart . path + '\n' +
You can’t perform that action at this time.
0 commit comments