axios bearer token
{
headers: {
'Authorization': 'Bearer ' + validToken()
}
}
axios bearer token
{
headers: {
'Authorization': 'Bearer ' + validToken()
}
}
Axios GET Req with Basic Auth
const res = await axios.get('https://httpbin.org/basic-auth/foo/bar', {
// Axios looks for the `auth` option, and, if it is set, formats a
// basic auth header for you automatically.
auth: {
username: 'foo',
password: 'bar'
}
});
res.status; // 200
Axios Req with Auth Token
// Send a GET request with the authorization header set to
// the string 'my secret token'
const res = await axios.get('https://httpbin.org/get', {
headers: {
'Authorization': 'my secret token'
}
});
axios basic auth generate
await axios.post(session_url, {}, {
auth: {
username: uname,
password: pass
}
});
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