Sorry I missed to say in my request…
Here is the code I used to get request header:
>>> headers = {"test": "hello world"}
>>> headers['User-Agent'] = ""
>>> import requests
>>> r = requests.request("GET", "https://header-test.firepup650.repl.co/", headers=headers)
>>> r.text
'{"Accept":"*/*","Accept-Encoding":"gzip, deflate, br","Content-Length":"3","Content-Type":"text/html; charset=utf-8","Host":"header-test.firepup650.repl.co","Test":"hello world","X-Anonymized-But-Never-Forgotten":"Doomsdaybear","X-Forwarded-For":"xxx.xxx.xxx.xxx","X-Forwarded-Proto":"https","X-Replit-User-Bio":"","X-Replit-User-Id":"","X-Replit-User-Name":"","X-Replit-User-Profile-Image":"","X-Replit-User-Roles":"","X-Replit-User-Teams":"","X-Replit-User-Url":""}\n'
>>> h=r.json()
>>> h
{'Accept': '*/*', 'Accept-Encoding': 'gzip, deflate, br', 'Content-Length': '3', 'Content-Type': 'text/html; charset=utf-8', 'Host': 'header-test.firepup650.repl.co', 'Test': 'hello world', 'X-Anonymized-But-Never-Forgotten': 'Doomsdaybear', 'X-Forwarded-For': 'xxx.xxx.xxx.xxx', 'X-Forwarded-Proto': 'https', 'X-Replit-User-Bio': '', 'X-Replit-User-Id': '', 'X-Replit-User-Name': '', 'X-Replit-User-Profile-Image': '', 'X-Replit-User-Roles': '', 'X-Replit-User-Teams': '', 'X-Replit-User-Url': ''}
>>> h['User-Agent']
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
KeyError: 'User-Agent'
>>> list(h.keys())
['Accept', 'Accept-Encoding', 'Content-Length', 'Content-Type', 'Host', 'Test', 'X-Anonymized-But-Never-Forgotten', 'X-Forwarded-For', 'X-Forwarded-Proto', 'X-Replit-User-Bio', 'X-Replit-User-Id', 'X-Replit-User-Name', 'X-Replit-User-Profile-Image', 'X-Replit-User-Roles', 'X-Replit-User-Teams', 'X-Replit-User-Url']
>>> r.headers
{'Content-Length': '467', 'Content-Type': 'application/json', 'Date': 'Tue, 04 Apr 2023 16:39:09 GMT', 'Expect-Ct': 'max-age=2592000, report-uri="https://sentry.repl.it/api/10/security/?sentry_key=xxxxxxxxxxxxxsomethingsherexxxxxx"', 'Replit-Cluster': 'global', 'Server': 'Werkzeug/2.2.2 Python/3.10.8', 'Strict-Transport-Security': 'max-age=4940139; includeSubDomains'}