我正在构建一个使用laravel和vuejs的web应用程序。我发出了一个axiosget请求,以获取用户列表。我正在获取一个Promise对象,并且从我所读到的内容。获取promise对象的原因是因为它是一个异步请求。 我已经尝试了.then()来获取响应的数据部分。但我得到的是一个巨大的脚本,而不是所需的数据。axios......then(function(response){
co
以及如何使用它
const interceptor = axios.interceptors.response.use((interceptor); <---- What does this do
return axios.post('/api/refresh_token', {error.response.config.headers['Authorization'] = '
这就是我的问题。我在我的项目中使用JWT身份验证,我的react项目中有一个axiosInstance设置。我还为axiosInstance提供了一个拦截器,它负责在需要时拦截和刷新令牌。performs get request
// But since we are passing the entire config of previous request但我的问题是,为了上传图像,内容类型应该是“多部分/表单-数据-边界:自动