http: How to get redirect location in Python
response = httpx.post("https://my.domain/api/redirect")
# Get redirect location
if response.has_redirect_location:
redirect_location = response.headers['Location']
else:
redirect_location = None
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow