axios send bearer token
const config = {
headers: { Authorization: `Bearer ${token}` }
};
Axios.post(
'http://localhost:8000/api/v1/get_token_payloads',
config
).then(console.log).catch(console.log);
axios send bearer token
const config = {
headers: { Authorization: `Bearer ${token}` }
};
Axios.post(
'http://localhost:8000/api/v1/get_token_payloads',
config
).then(console.log).catch(console.log);
axios bearer token
{
headers: {
'Authorization': 'Bearer ' + validToken()
}
}
send token in axios header
const username = ''
const password = ''
const token = Buffer.from(`${username}:${password}`, 'utf8').toString('base64')
const url = 'https://...'
const data = {
...
}
axios.post(url, data, {
headers: {
'Authorization': `Basic ${token}`
},
})
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us