lsrestclient 3.1.0__tar.gz → 3.1.1__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {lsrestclient-3.1.0 → lsrestclient-3.1.1}/PKG-INFO +1 -1
- {lsrestclient-3.1.0 → lsrestclient-3.1.1}/lsrestclient/client.py +3 -3
- {lsrestclient-3.1.0 → lsrestclient-3.1.1}/pyproject.toml +1 -1
- {lsrestclient-3.1.0 → lsrestclient-3.1.1}/README.md +0 -0
- {lsrestclient-3.1.0 → lsrestclient-3.1.1}/lsrestclient/__init__.py +0 -0
- {lsrestclient-3.1.0 → lsrestclient-3.1.1}/lsrestclient/auth.py +0 -0
- {lsrestclient-3.1.0 → lsrestclient-3.1.1}/lsrestclient/contexts/__init__.py +0 -0
- {lsrestclient-3.1.0 → lsrestclient-3.1.1}/lsrestclient/contexts/bearer_token.py +0 -0
- {lsrestclient-3.1.0 → lsrestclient-3.1.1}/lsrestclient/exceptions.py +0 -0
- {lsrestclient-3.1.0 → lsrestclient-3.1.1}/lsrestclient/fixtures.py +0 -0
- {lsrestclient-3.1.0 → lsrestclient-3.1.1}/lsrestclient/mock.py +0 -0
- {lsrestclient-3.1.0 → lsrestclient-3.1.1}/lsrestclient/response.py +0 -0
@@ -64,13 +64,13 @@ class LsRestClient(Session):
|
|
64
64
|
base_url: str = None,
|
65
65
|
name: str = "default",
|
66
66
|
headers: dict = None,
|
67
|
-
|
67
|
+
ignore_bearer_context: bool = False,
|
68
68
|
) -> None:
|
69
69
|
"""Class representing a REST client for JSON API."""
|
70
70
|
|
71
71
|
self._mocks = {}
|
72
72
|
self.base_url = base_url
|
73
|
-
self.
|
73
|
+
self.ignore_bearer_context = ignore_bearer_context
|
74
74
|
self.base_headers = {"content-type": "application/json"}
|
75
75
|
|
76
76
|
with bearer_token_context() as bearer_token:
|
@@ -174,7 +174,7 @@ class LsRestClient(Session):
|
|
174
174
|
with bearer_token_context() as bearer_token:
|
175
175
|
bearer_headers = (
|
176
176
|
{"Authorization": f"Bearer {bearer_token}"}
|
177
|
-
if bearer_token is not None and not self.
|
177
|
+
if bearer_token is not None and not self.ignore_bearer_context
|
178
178
|
else {}
|
179
179
|
)
|
180
180
|
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|