HTTP Request - Automatically allow redirects

Hello, I’m facing the same issue.
In the endpoint, there is a redirect URL.
That’s why i get statuscode 200 instead of 302.
Is there already a solution for this?
Or is there a code I can use to achieve the same thing? To disable the ‘automatically follow redirects’?
I already find the following post: How to check whether the URLs is redirecting or not
But then I don’t get the correct location in the headers of the response: “message”: “https://… error_description=Failed%20to%20get%20resource%20owner%20session%20from%20request&error=invalid_request”,