http: Como obtener redirect location en Python

get_redirect.py
response = httpx.post("https://my.domain/api/redirect")
# Obtener redirect location
if response.has_redirect_location:
    redirect_location = response.headers['Location']
else:
    redirect_location = None

Echa un vistazo a artículos similares por categoría: Python