镜像自地址
https://github.com/therootcompany/request.js.git
已同步 2024-11-16 17:28:58 +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.'
|
'[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...
|
// 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) {
|
if (opts.formData) {
|
||||||
|
|||||||
正在加载...
x
在新工单中引用
屏蔽一个用户