finalsa-common-http-client 0.1.1__tar.gz → 0.1.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {finalsa_common_http_client-0.1.1 → finalsa_common_http_client-0.1.2}/PKG-INFO +1 -1
- {finalsa_common_http_client-0.1.1 → finalsa_common_http_client-0.1.2}/finalsa/http/async_client/base.py +1 -2
- {finalsa_common_http_client-0.1.1 → finalsa_common_http_client-0.1.2}/finalsa/http/sync_client/base.py +5 -5
- {finalsa_common_http_client-0.1.1 → finalsa_common_http_client-0.1.2}/pyproject.toml +1 -1
- {finalsa_common_http_client-0.1.1 → finalsa_common_http_client-0.1.2}/.gitignore +0 -0
- {finalsa_common_http_client-0.1.1 → finalsa_common_http_client-0.1.2}/LICENSE.md +0 -0
- {finalsa_common_http_client-0.1.1 → finalsa_common_http_client-0.1.2}/README.md +0 -0
- {finalsa_common_http_client-0.1.1 → finalsa_common_http_client-0.1.2}/finalsa/http/__init__.py +0 -0
- {finalsa_common_http_client-0.1.1 → finalsa_common_http_client-0.1.2}/finalsa/http/_shared.py +0 -0
- {finalsa_common_http_client-0.1.1 → finalsa_common_http_client-0.1.2}/finalsa/http/async_client/__init__.py +0 -0
- {finalsa_common_http_client-0.1.1 → finalsa_common_http_client-0.1.2}/finalsa/http/sync_client/__init__.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: finalsa-common-http-client
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.2
|
|
4
4
|
Summary: HTTP client library for common data types used in business applications
|
|
5
5
|
Project-URL: Homepage, https://github.com/finalsa/finalsa-http-client
|
|
6
6
|
Project-URL: Documentation, https://github.com/finalsa/finalsa-http-client#readme
|
|
@@ -124,8 +124,7 @@ class BaseAsyncHttpClient:
|
|
|
124
124
|
)
|
|
125
125
|
merged_headers = shared.merge_headers(self._default_headers, headers)
|
|
126
126
|
request_timeout = self._normalize_timeout(timeout) or self._timeout
|
|
127
|
-
self._logger.info(f"{method.upper()} request to {resolved_url}", extra={
|
|
128
|
-
"headers": merged_headers, "timeout": request_timeout, "params": params})
|
|
127
|
+
self._logger.info(f"{method.upper()} request to {resolved_url}", extra={"timeout": request_timeout, "params": params})
|
|
129
128
|
start_time = time.time()
|
|
130
129
|
response = await session.request(
|
|
131
130
|
method.upper(),
|
|
@@ -106,7 +106,7 @@ class BaseSyncHttpClient:
|
|
|
106
106
|
request_timeout = timeout if timeout is not None else self._timeout
|
|
107
107
|
try:
|
|
108
108
|
self._logger.info(f"{method.upper()} request to {resolved_url}", extra={
|
|
109
|
-
"
|
|
109
|
+
"timeout": request_timeout, "params": params})
|
|
110
110
|
start_time = time.time()
|
|
111
111
|
response = session.request(
|
|
112
112
|
method.upper(),
|
|
@@ -128,12 +128,12 @@ class BaseSyncHttpClient:
|
|
|
128
128
|
except requests.RequestException as e:
|
|
129
129
|
if e.response is not None and "Content-Type" in e.response.headers and e.response.headers["Content-Type"] == "application/json":
|
|
130
130
|
data = e.response.json()
|
|
131
|
-
self._logger.error(f"
|
|
132
|
-
"status": e.response.status_code, "
|
|
131
|
+
self._logger.error(f"Response error with status {e.response.status_code}", extra={
|
|
132
|
+
"status": e.response.status_code, "body": data})
|
|
133
133
|
shared.raise_for_response(data, e.response.status_code)
|
|
134
134
|
|
|
135
|
-
self._logger.error(f"
|
|
136
|
-
"status": e.response.status_code
|
|
135
|
+
self._logger.error(f"Response error with status {e.response.status_code}", extra={
|
|
136
|
+
"status": e.response.status_code})
|
|
137
137
|
raise e
|
|
138
138
|
|
|
139
139
|
def get(self, path: str, **kwargs: Any) -> requests.Response:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{finalsa_common_http_client-0.1.1 → finalsa_common_http_client-0.1.2}/finalsa/http/__init__.py
RENAMED
|
File without changes
|
{finalsa_common_http_client-0.1.1 → finalsa_common_http_client-0.1.2}/finalsa/http/_shared.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|