📅  最后修改于: 2022-03-11 14:52:01.815000             🧑  作者: Mango
fetch(url, {
...options,
headers: {
'Authorization': 'Basic ' + btoa(`${username}:${password}`)
}
})
.then(response => response.json())
.then(json => console.log(json));