I have an endpoint that I call that automatically redirects to another url which has a uid inside the url path that I need. Because I'm using React Native I'm unable to retrieve the current url with something like window.location.
Another thing I've tried is retrieving the location response header from the endpoint that I'm calling. The problem here is that I don't know how to stop the redirection after the first call.
I've tried using maxRedirect: 0, but as far as I know this doesn't work using React Native.
How could I go about solving this problem?