Getting a variable from a POST response header that shows multiple redirects

When I do my post method, there are 8 redirects. In the 7th redirect, I want to get data but instead it will always take it from the last 8th redirect. How do I get the location data from the 7th redirect?