javascript - Axios 使用基本身份验证禁用用户名和密码提示
问题描述
在使用 Axios 进行基本身份验证时,是否可以选择禁用提示,或者至少以某种方式隐藏它?
var base64encodedData = Buffer.from(this.username + ':' + hash.hex()).toString('base64');
var config = {
headers: { Authorization : 'Basic ' + base64encodedData},
responseType: 'json'
};
axios.get('/users/self',config)
.then((response) => {
console.log("response");
console.log(response);
console.log(response.data);
});
解决方案
推荐阅读
- amazon-web-services - api gateway rest api geolocation headers
- django - 无法登录生产/django
- python - 输入不适用于if语句python
- mongodb - 文档中的 Mongo db 更新数组
- mobile - jquery.jcarousel-swipe.js 一次滑动一张幻灯片问题
- algorithm - 比较散列的除法与乘法
- r - Datetime problem when using Lubridate function
- python - 在 __geo_interface__ geopandas choropleth 地图出现错误,有人知道吗?
- python-3.x - 使用 SQLAlchemy 和 fastAPI 连接到数据库时出错
- r - 在ggplot2中创建上/下abline点的数据表