fix headers

This commit is contained in:
Antonio J. Delgado 2025-02-17 09:47:58 +02:00
parent 11a84f9180
commit 4bfe099883

View file

@ -75,10 +75,10 @@ class MastodonEmailBridge:
autoescape=select_autoescape() autoescape=select_autoescape()
) )
self.translate_session = requests.Session() self.translate_session = requests.Session()
headers = [ headers = {
'accept: application/json', 'accept': 'application/json',
'Content-Type: application/x-www-form-urlencoded', 'Content-Type': 'application/x-www-form-urlencoded',
] }
self.translate_session.headers.update(headers) self.translate_session.headers.update(headers)
self.session = requests.Session() self.session = requests.Session()
self.session.headers.update({'Authorization': f"Bearer {self.config['token']}"}) self.session.headers.update({'Authorization': f"Bearer {self.config['token']}"})