Axios GET, PUT, POST and DELETE in NextJs (Complete CRUD)
Set Header with Authorization Bearer token
import axios from 'axios';
axios.defaults.baseURL = 'http://localhost:1010/'
axios.defaults.headers.common = {'Authorization': `bearer ${token}`}
export default axios;
Some API require bearer to be written a...
mandeepsingh.hashnode.dev4 min read