Given following example usage:
adapter = HTTPAdapter(max_retries=Retry(
total=5,
backoff_factor=0.1,
status_forcelist=[429, 500, 502, 503, 504],
method_whitelist=["HEAD", "GET", "OPTIONS"]
))
session = requests.Session()
session.mount("http://", adapter)
session.mount("https://", adapter)
rsp = session.post(url, json=my_json, params=my_params)
How do I tell how many retries were made? I'm trying to debug/diagnose/resolve an issue posted in this related question
Alternatively, is there a different usage of these libs that provides this?