Axiosでbasic認証を行う
#Axios
code:sample.js
axios
.get(endpointUri, {
auth: {
username: "admin",
password: "password",
},
})
.then((res) => {
setBody(res.data.body);
});