📅  最后修改于: 2022-03-11 15:03:26.384000             🧑  作者: Mango
// for node-fetch
fetch(url, {
...
headers: {
'Authorization': 'Basic ' + Buffer.from(`${username}:${password}`, 'binary').toString('base64')
}
...
})