import axios from "axios"

const request = axios.create({
    baseURL:'http://192.168.5.100:2088',
    timeout:10000
})

// request.interceptors.request.use(config=>{
//     config.headers.Authorization = localStorage.getItem('token')
//     return config
// },err=>{
//     Promise.reject(err)
// }
// )

request.interceptors.response.use(res=>{
    alert(res.data.message)
    return res.data
},err=>{
    alert(err.response.data.message)
}
)

export default request