lsrestclient 1.7.1__tar.gz → 1.7.2__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {lsrestclient-1.7.1 → lsrestclient-1.7.2}/PKG-INFO +1 -1
- {lsrestclient-1.7.1 → lsrestclient-1.7.2}/lsrestclient/client.py +14 -7
- {lsrestclient-1.7.1 → lsrestclient-1.7.2}/pyproject.toml +1 -1
- {lsrestclient-1.7.1 → lsrestclient-1.7.2}/README.md +0 -0
- {lsrestclient-1.7.1 → lsrestclient-1.7.2}/lsrestclient/__init__.py +0 -0
- {lsrestclient-1.7.1 → lsrestclient-1.7.2}/lsrestclient/auth.py +0 -0
- {lsrestclient-1.7.1 → lsrestclient-1.7.2}/lsrestclient/contexts/__init__.py +0 -0
- {lsrestclient-1.7.1 → lsrestclient-1.7.2}/lsrestclient/contexts/bearer_token.py +0 -0
- {lsrestclient-1.7.1 → lsrestclient-1.7.2}/lsrestclient/exceptions.py +0 -0
- {lsrestclient-1.7.1 → lsrestclient-1.7.2}/lsrestclient/fixtures.py +0 -0
- {lsrestclient-1.7.1 → lsrestclient-1.7.2}/lsrestclient/mock.py +0 -0
- {lsrestclient-1.7.1 → lsrestclient-1.7.2}/lsrestclient/response.py +0 -0
@@ -98,7 +98,7 @@ class LsRestClient(Session):
|
|
98
98
|
|
99
99
|
:param url: The relative URL to be used to build the full URL.
|
100
100
|
:param params: An optional dictionary that contains the parameters to be used in formatting the URL.
|
101
|
-
|
101
|
+
Default is None. Used parameters get removed from the dictionary.
|
102
102
|
:return: The full URL with the parameters replaced.
|
103
103
|
"""
|
104
104
|
|
@@ -177,6 +177,16 @@ class LsRestClient(Session):
|
|
177
177
|
if body is not None:
|
178
178
|
kwargs["data"] = lsjsonclasses.LSoftJSONEncoder.dumps(body).encode("utf8")
|
179
179
|
|
180
|
+
return self.real_request(method, url, *args, params=params, **kwargs)
|
181
|
+
|
182
|
+
def real_request(
|
183
|
+
self,
|
184
|
+
method: str,
|
185
|
+
url: str,
|
186
|
+
*args,
|
187
|
+
params: Optional[Dict[str, Any]] = None,
|
188
|
+
**kwargs,
|
189
|
+
):
|
180
190
|
full_url = self.full_url(url, params)
|
181
191
|
|
182
192
|
try:
|
@@ -202,6 +212,7 @@ class LsRestClient(Session):
|
|
202
212
|
:param kwargs: Additional keyword arguments for the request.
|
203
213
|
:return: The response object of type LsRestClientResponse.
|
204
214
|
"""
|
215
|
+
|
205
216
|
return self.caller("GET", *args, **kwargs)
|
206
217
|
|
207
218
|
def post(self, *args, **kwargs) -> LsRestClientResponse:
|
@@ -281,17 +292,13 @@ class LsRestClientTestClient(LsRestClient):
|
|
281
292
|
super().__init__(base_url=None, name=name)
|
282
293
|
self.test_client = test_client
|
283
294
|
|
284
|
-
def
|
295
|
+
def real_request(
|
285
296
|
self,
|
286
297
|
method: str,
|
287
298
|
url: str,
|
288
299
|
*args,
|
289
300
|
params: Optional[Dict[str, Any]] = None,
|
290
|
-
body: Optional[Dict[str, Any]] = None,
|
291
301
|
**kwargs,
|
292
|
-
)
|
293
|
-
if body is not None:
|
294
|
-
kwargs["data"] = lsjsonclasses.LSoftJSONEncoder.dumps(body).encode("utf8")
|
295
|
-
|
302
|
+
):
|
296
303
|
r = self.test_client.request(method, url, *args, params=params, **kwargs)
|
297
304
|
return LsRestClientResponse(status_code=r.status_code, content=r.content.decode("utf8"), headers=r.headers)
|
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
|