title: How can I write conditional interceptor in Axios
body: <p>I am able to add an interceptor for the Axios pipeline. Also, I need the loader to be conditional based. The situation is some requests can run in the background and don't need a loader to be blocking the UI. In such cases, I will be able to let the Axios know by sending an extra parameter saying isBackground call. How can I achieve this?</p>
  
  <pre><code>      axios.interceptors.request.use((config) =&gt; {
              this.isLoading = true; // Or trigger start loader
              return config
          }, (error) =&gt; {
              this.isLoading = false  // Or trigger stoploader
              return Promise.reject(error)
          })
  
          axios.interceptors.response.use((response) =&gt; {
              this.isLoading = false    // Or trigger stoploader
              return response
          }, function(error) {
              this.isLoading = false   // Or trigger stoploader
              return Promise.reject(error)
          })
  </code></pre>