This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
This is an example of how to set up an axios instance to work with devise_token_auth gem. | |
*/ | |
import axios from 'axios'; | |
// Add the token headers to every request | |
const addTokenHeaders = (request) => { | |
let tokenAuth = localStorage.tokenAuth; | |
if(tokenAuth) { |