Skip to content

Commit e61b349

Browse files
committed
🔥 Useless headers
1 parent bf7df87 commit e61b349

1 file changed

Lines changed: 1 addition & 10 deletions

File tree

comwatt/client.py

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,9 @@ def __init__(self):
1010
# so you will need to encrypt it from their webapp
1111
def authenticate(self, username, password):
1212
url = f'{self.base_url}/v1/authent'
13-
headers = {
14-
'User-Agent': 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/115.0',
15-
'Accept': 'application/json, text/plain, */*',
16-
'Accept-Language': 'en-US,en;q=0.5',
17-
'Content-Type': 'application/json;charset=utf-8',
18-
'Sec-Fetch-Dest': 'empty',
19-
'Sec-Fetch-Mode': 'cors',
20-
'Sec-Fetch-Site': 'same-origin'
21-
}
2213
data = {'username': username, 'password': password}
2314

24-
response = self.session.post(url, headers=headers, json=data)
15+
response = self.session.post(url, json=data)
2516

2617
if response.status_code != 200:
2718
raise Exception(f'Authentication failed: {response.status_code}')

0 commit comments

Comments
 (0)