title: How can you use axios interceptors?
body: <p>I have seen axios documentation, but all it says is</p>
  
  <pre><code>// Add a request interceptor
  axios.interceptors.request.use(function (config) {
      // Do something before request is sent
      return config;
    }, function (error) {
      // Do something with request error
      return Promise.reject(error);
    });
  
  // Add a response interceptor
  axios.interceptors.response.use(function (response) {
    // Do something with response data
    return response;
  }, function (error) {
    // Do something with response error
    return Promise.reject(error);
  });
  </code></pre>
  
  <p>Also many tutorials only show this code but I am confused what it is used for, can someone please give me simple example to follow.</p>