I used HTTP client to get the status of the URL. By Default the AllowAutoRedirect is True.
It automatically process the URL redirection. But it fails if the location header returns the absolute URL.
It stops the request and return last location header url status.
Example:
URL A ("http://www.alphabets.com/a") -> Redirect -> URL B ("http://www.alphabets.com/b")
URL B ("http://www.alphabets.com/b") -> Redirect -> URL C ("http://www.alphabets.com/c")
URL C ("http://www.alphabets.com/c") -> Redirect -> URL D ("http://www.alphabets.com/d")
URL D ("http://www.alphabets.com/d")-> Redirect -> URL E ("/e") (E is relative URL)
URL D status code is returned as status code. But the actual Redirected URL is F.
is there any way to overcome this case and get URL F as the redirected one.
Note:
It can be achieved by setting AllowAutoRedirect=false and manually handle the redirection. But I want to find, is there any way to achieve this with AllowAutoRedirect=True