Commit 18ba6452 authored by Nane Kratzke's avatar Nane Kratzke
Browse files

report headers

parent edae42ab
......@@ -24,7 +24,9 @@ def index():
return "Bad config", 500
def load_url(url, headers):
print(f"Got these headers {dict(headers)}")
h = { "User-Agent": headers['User-Agent'] }
print(f"Loading {url} with these headers {h}")
return json.loads(requests.get(url, headers=h, allow_redirects=True).content)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment