Skip to content

Commit f9194e9

Browse files
committed
sign AppAPI requests with update method to support httpx.Headers
Signed-off-by: Alexander Piskun <bigcat88@icloud.com>
1 parent 763828b commit f9194e9

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
## [0.5.1 - 2023-11-xx]
6+
7+
### Fixed
8+
9+
- `headers` can now be `httpx.Headers` and not only `dict`. #158
10+
511
## [0.5.0 - 2023-10-23]
612

713
### Added

nc_py_api/_session.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ def _create_adapter(self) -> Client:
424424
return adapter
425425

426426
def sign_request(self, headers: dict) -> None:
427-
headers["AUTHORIZATION-APP-API"] = b64encode(f"{self._user}:{self.cfg.app_secret}".encode("UTF=8"))
427+
headers.update({"AUTHORIZATION-APP-API": b64encode(f"{self._user}:{self.cfg.app_secret}".encode("UTF=8"))})
428428

429429
def sign_check(self, request: Request) -> None:
430430
headers = {

0 commit comments

Comments
 (0)