im trying to get access to the axios instance in this little api client im making. how can i acheive that? What i want to do is to be able to call axios in getUsers.
import axios from 'axios'
/*export const API = axios.create({
baseURL: 'http://jsonplaceholder.typicode.com/'
})*/
let getReq = new Request('https://jsonplaceholder.typicode.com/users', {
method: 'GET',
header: new Headers()
})
export default class Api {
static getUsers () {
const request = getReq
return axios.get()
.then(response => response.json())
}
}