Skip to content

Commit

Permalink
Added Content-Type header
Browse files Browse the repository at this point in the history
  • Loading branch information
marzipankaiser committed Nov 11, 2021
1 parent 45e7f4b commit f64c411
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/drink.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ def get_login_token():
def refresh_token():
"""Fetch a new login token"""
global cfg, cache
r = requests.post(cfg['url'] + "/auth/login", data={'password': cfg['pw']})
r = requests.post(cfg['url'] + "/auth/login", data={'password': cfg['pw']},
headers={'Content-Type': 'application/json'})
if r.status_code == 403:
print("Failed to get login token: wrong password.", file=sys.stderr)
cfg.reset_parameter('pw')
Expand Down

0 comments on commit f64c411

Please sign in to comment.