From 5b5e30abd91d7a8083ae0855596d1c5c1d189497 Mon Sep 17 00:00:00 2001 From: Brooks Travis Date: Wed, 27 Nov 2024 14:22:35 -0600 Subject: [PATCH] Adding base_headers to logout call in __exit__ --- folioclient/FolioClient.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/folioclient/FolioClient.py b/folioclient/FolioClient.py index 19d222c..74105b1 100644 --- a/folioclient/FolioClient.py +++ b/folioclient/FolioClient.py @@ -69,7 +69,9 @@ def __exit__(self, exc_type, exc_value, traceback): if self.cookies: logging.info("Logging out...") logout = httpx_client.post( - urljoin(self.okapi_url, "authn/logout"), cookies=self.cookies + urljoin(self.okapi_url, "authn/logout"), + headers=self.base_headers, + cookies=self.cookies, ) logout.raise_for_status() logging.info("Logged out")