We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9203a56 commit a267b76Copy full SHA for a267b76
src/util/request.web.js
@@ -48,8 +48,7 @@ export default function (baseUrl, options) {
48
const auth = typeof username === 'string' ? {username, password} : {}
49
50
if (auth.username !== undefined && headers['Authorization'] === undefined) {
51
- const btoa = window.btoa ? window.btoa : window.base64.encode
52
- headers['Authorization'] = 'Basic ' + btoa(auth.username + ':' + auth.password)
+ headers['Authorization'] = 'Basic ' + window.btoa(auth.username + ':' + auth.password)
53
}
54
55
const urlParts = {
@@ -71,7 +70,6 @@ export default function (baseUrl, options) {
71
70
const req = xhr({
72
responseType: 'text',
73
...options,
74
- ...auth,
75
url: formatUrl(urlParts),
76
body,
77
method,
0 commit comments