title: Redux middleware: Want to send a response header as a parameter to the middleware
body: <p>I am making all API calls from a generic function and in some of the responses, a custom response header comes. Using this header, I need to make another API call. Can this be achieved by using Redux middleware?</p>
  
  <pre><code>// function 1
  return ApiCaller.post('url').then(json =&gt; {
    dispatch(someAction(json));
  })
  
  // function 2
  return ApiCaller.post('anotherurl').then(json =&gt; {
    dispatch(someOtherAction(json));
  })
  
  // ApiCaller
  fetch(url).then(response =&gt; {
    // before this I want to make another post call with data as response 
    // header 'x' value
    return response;
  }
  </code></pre>
  
  <p>In the middleware I would want to read a key from the response header and make another API call, is it possible?</p>