Answers for "how to send authentication token in header in axios"

7

axios bearer token

{
    headers: {
      'Authorization': 'Bearer ' + validToken()
    }
 }
Posted by: Guest on December-20-2020
0

add authorization header axios

// 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'
  }
});
Posted by: Guest on July-11-2020

Code answers related to "how to send authentication token in header in axios"

Browse Popular Code Answers by Language