finalsa-common-http-client 0.1.0__tar.gz → 0.1.1__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.0 → finalsa_common_http_client-0.1.1}/PKG-INFO +1 -1
- {finalsa_common_http_client-0.1.0 → finalsa_common_http_client-0.1.1}/finalsa/http/async_client/base.py +4 -4
- {finalsa_common_http_client-0.1.0 → finalsa_common_http_client-0.1.1}/finalsa/http/sync_client/base.py +3 -3
- {finalsa_common_http_client-0.1.0 → finalsa_common_http_client-0.1.1}/pyproject.toml +1 -1
- {finalsa_common_http_client-0.1.0 → finalsa_common_http_client-0.1.1}/.gitignore +0 -0
- {finalsa_common_http_client-0.1.0 → finalsa_common_http_client-0.1.1}/LICENSE.md +0 -0
- {finalsa_common_http_client-0.1.0 → finalsa_common_http_client-0.1.1}/README.md +0 -0
- {finalsa_common_http_client-0.1.0 → finalsa_common_http_client-0.1.1}/finalsa/http/__init__.py +0 -0
- {finalsa_common_http_client-0.1.0 → finalsa_common_http_client-0.1.1}/finalsa/http/_shared.py +0 -0
- {finalsa_common_http_client-0.1.0 → finalsa_common_http_client-0.1.1}/finalsa/http/async_client/__init__.py +0 -0
- {finalsa_common_http_client-0.1.0 → finalsa_common_http_client-0.1.1}/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.1
|
|
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
|
|
@@ -91,10 +91,10 @@ class BaseAsyncHttpClient:
|
|
|
91
91
|
return
|
|
92
92
|
if "Content-Type" in headers and headers["Content-Type"] == "application/json":
|
|
93
93
|
data = await response.json()
|
|
94
|
-
self._logger.error(f"
|
|
94
|
+
self._logger.error(f"Response error with status {response.status}", extra={
|
|
95
95
|
"status": response.status, "headers": headers, "data": data})
|
|
96
96
|
shared.raise_for_response(data, response.status)
|
|
97
|
-
self._logger.error(f"
|
|
97
|
+
self._logger.error(f"Response error with status {response.status}", extra={
|
|
98
98
|
"status": response.status, "headers": headers})
|
|
99
99
|
raise shared.InternalHttpError(response.status)
|
|
100
100
|
|
|
@@ -124,7 +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}
|
|
127
|
+
self._logger.info(f"{method.upper()} request to {resolved_url}", extra={
|
|
128
128
|
"headers": merged_headers, "timeout": request_timeout, "params": params})
|
|
129
129
|
start_time = time.time()
|
|
130
130
|
response = await session.request(
|
|
@@ -141,7 +141,7 @@ class BaseAsyncHttpClient:
|
|
|
141
141
|
end_time = time.time()
|
|
142
142
|
duration = end_time - start_time
|
|
143
143
|
self._logger.info(
|
|
144
|
-
f"
|
|
144
|
+
f"Response success from {resolved_url} with status {response.status}",
|
|
145
145
|
extra={"status": response.status, "duration": duration})
|
|
146
146
|
return response
|
|
147
147
|
|
|
@@ -105,7 +105,7 @@ class BaseSyncHttpClient:
|
|
|
105
105
|
merged_headers = shared.merge_headers(self._default_headers, headers)
|
|
106
106
|
request_timeout = timeout if timeout is not None else self._timeout
|
|
107
107
|
try:
|
|
108
|
-
self._logger.info(f"{method.upper()} request to {resolved_url}
|
|
108
|
+
self._logger.info(f"{method.upper()} request to {resolved_url}", extra={
|
|
109
109
|
"headers": merged_headers, "timeout": request_timeout, "params": params})
|
|
110
110
|
start_time = time.time()
|
|
111
111
|
response = session.request(
|
|
@@ -120,8 +120,8 @@ class BaseSyncHttpClient:
|
|
|
120
120
|
)
|
|
121
121
|
end_time = time.time()
|
|
122
122
|
duration = end_time - start_time
|
|
123
|
-
self._logger.info(f"Received response from {resolved_url} with status {response.
|
|
124
|
-
"status": response.
|
|
123
|
+
self._logger.info(f"Received response from {resolved_url} with status {response.status_code}", extra={
|
|
124
|
+
"status": response.status_code, "duration": duration})
|
|
125
125
|
if self._raise_for_status:
|
|
126
126
|
response.raise_for_status()
|
|
127
127
|
return response
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{finalsa_common_http_client-0.1.0 → finalsa_common_http_client-0.1.1}/finalsa/http/__init__.py
RENAMED
|
File without changes
|
{finalsa_common_http_client-0.1.0 → finalsa_common_http_client-0.1.1}/finalsa/http/_shared.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|