зеркало из
https://github.com/therootcompany/request.js
synced 2025-09-18 00:08:19 +00:00
bugfix request compat opts.auth.bearer
Этот коммит содержится в:
родитель
5b5cd36aa5
Коммит
812f4e6062
5
index.js
5
index.js
@ -264,9 +264,10 @@ function setDefaults(defs) {
|
||||
'[Warn] setting `sendImmediately: false` is not yet supported. Please open an issue if this is an important feature that you need.'
|
||||
);
|
||||
}
|
||||
if (opts.bearer) {
|
||||
// [request-compat]
|
||||
if (opts.auth.bearer) {
|
||||
// having a shortcut for base64 encoding makes sense, but this? Eh, whatevs...
|
||||
finalOpts.header.Authorization = 'Bearer: ' + opts.bearer;
|
||||
finalOpts.header.Authorization = 'Bearer ' + opts.auth.bearer;
|
||||
}
|
||||
}
|
||||
if (opts.formData) {
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user