title: Handling refresh token by recall same request after refreshing the token
body: <p>I am trying to make a common interceptor to authorize all my outgoing requests.</p>
  
  <p>My logic is as follows:</p>
  
  <p>All my outgoing requests/API calls passes through the interceptor first to check on my token expiry and in-case the response was un-authorized I make an internal call to refresh the token and update my storage keys with the new values.</p>
  
  <p>Now I need to recall the original request with the new token value, but I can't figure out how to detect the original request that passed through the interceptor.</p>
  
  <p>This is my code :</p>
  
  <pre><code>export  const unregister =  fetchIntercept.register({
    request: function (url, config) {
      return [url, config];
    },
  
    requestError: function (error) {
      return Promise.reject(error);
    },
    responseError: function (error) {
      return Promise.reject(error);
    },
  
    response: function (response) {
      if (response.status == 401) {
        Services.refreshToken((res)=&gt;{
          if (res.message == 'success') {
            // if token has been refreshed
            // recall the request again
          }else {
            // login again
          }
        })
      }else {
        return response;
      }
    }
  })
  
  </code></pre>
  
  <p>The problem is that I've no idea how to recall the same request that passed through the interceptor.. I did some search on this, but couldn't find a way to execute this.</p>