Skip to content

Latest commit

 

History

History
18 lines (14 loc) · 401 Bytes

README.md

File metadata and controls

18 lines (14 loc) · 401 Bytes

axios-request-timer

Axios interceptor to mesaure request time

Usage

Copy the file into your project then create axios instance and apply interceptors

//create axios instance

const http = axios.create({
  baseURL: '',
  headers: {},
});

//apply interceptors
http.interceptors.request.use(httpTimer().requestTimer);
http.interceptors.response.use(httpTimer().responseTimer);