코드

axios.interceptors.response.use(
    (response) => {
        console.timeEnd(response.config.url);
        return response;
    },
    (error) => {
        console.timeEnd(error.response.config.url);
        return Promise.reject(error);
    }
);

axios.interceptors.request.use(
    function (config) {
        console.time(config.url );
        return config;
    }, function (error) {
        return Promise.reject(error);
    });

 

 

 

 

참고 사이트 

https://stackoverflow.com/questions/49874594/how-to-get-response-times-from-axios

 

 

 

+ Recent posts