Closed davision closed 6 years ago
@davision
See below.
import axios from 'axios'
const b64string = 'YOUR_B64_STRING'
axios.defaults.headers.authorization = `Basic ${b64string}`
axios.get('http://localhost:3000/')
import axios from 'axios'
const b64string = 'YOUR_B64_STRING'
axios.get(
'http://localhost:3000/',
{
headers: {
authorization: `Basic ${b64string}`
}
}
)
Thank you very much! Will try this out.
How can I access this auth with axios in a form of headers and Base64?