Skip to content

Commit 4fa7012

Browse files
authored
Fix encoding for basic authentication (#97)
1 parent 0402e60 commit 4fa7012

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/aiontfy/ntfy.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@ def __init__(
4545
self._headers = None
4646

4747
if username is not None and password is not None:
48-
self._headers = {"Authorization": BasicAuth(username, password).encode()}
48+
self._headers = {
49+
"Authorization": BasicAuth(username, password, "utf8").encode()
50+
}
4951
elif token is not None:
5052
self._headers = {"Authorization": f"Bearer {token}"}
5153

0 commit comments

Comments
 (0)