title: How to use axios interceptors in ES6 generators?
body: <p>Currently, I have this Axios call, what I want to achieve is use interceptors inside ES6 generators.</p>
  <p>I want to use axios interceptors to retry a request if the back end service sends back a &quot;401&quot; response, any suggestion?</p>
  <pre><code>const token = '...';
  
  export function* getUsers(user) {
    return yield axios({
      headers: {
        Accept: &quot;Aplication/json&quot;,
        Authorization: `Bearer ${token}`,
      },
      method: &quot;get&quot;,
      url: '/getUsers/:id'
   })
    .then(data =&gt; data)
    .catch(e =&gt; e)
   }
  </code></pre>