import requests
import urllib3
import json
urllib3.disable_warnings()

r = requests.get("https://localhost:5000/examples/default/index.json", verify=False)
print(f"Status: {r.status_code}")
print(f"Content-Type: {r.headers.get('Content-Type')}")
print(f"Body:\n{r.text}")

try:
    data = r.json()
    print(f"\nParsed JSON:")
    print(json.dumps(data, indent=2))
except:
    print("Not valid JSON")
