finalsa-common-http-client 0.0.5__tar.gz → 0.0.7__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.0.5 → finalsa_common_http_client-0.0.7}/LICENSE.md +1 -1
- {finalsa_common_http_client-0.0.5 → finalsa_common_http_client-0.0.7}/PKG-INFO +2 -2
- {finalsa_common_http_client-0.0.5 → finalsa_common_http_client-0.0.7}/finalsa/http/_shared.py +1 -1
- {finalsa_common_http_client-0.0.5 → finalsa_common_http_client-0.0.7}/finalsa/http/async_client/base.py +1 -2
- {finalsa_common_http_client-0.0.5 → finalsa_common_http_client-0.0.7}/finalsa/http/sync_client/base.py +1 -7
- {finalsa_common_http_client-0.0.5 → finalsa_common_http_client-0.0.7}/pyproject.toml +1 -1
- {finalsa_common_http_client-0.0.5 → finalsa_common_http_client-0.0.7}/.gitignore +0 -0
- {finalsa_common_http_client-0.0.5 → finalsa_common_http_client-0.0.7}/README.md +0 -0
- {finalsa_common_http_client-0.0.5 → finalsa_common_http_client-0.0.7}/finalsa/http/__init__.py +0 -0
- {finalsa_common_http_client-0.0.5 → finalsa_common_http_client-0.0.7}/finalsa/http/async_client/__init__.py +0 -0
- {finalsa_common_http_client-0.0.5 → finalsa_common_http_client-0.0.7}/finalsa/http/sync_client/__init__.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c)
|
|
3
|
+
Copyright (c) 2025 Luis Diego Jiménez Delgado
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: finalsa-common-http-client
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.7
|
|
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
|
|
@@ -10,7 +10,7 @@ Project-URL: Changelog, https://github.com/finalsa/finalsa-http-client/blob/main
|
|
|
10
10
|
Author-email: Luis Jimenez <luis@finalsa.com>
|
|
11
11
|
License: MIT License
|
|
12
12
|
|
|
13
|
-
Copyright (c)
|
|
13
|
+
Copyright (c) 2025 Luis Diego Jiménez Delgado
|
|
14
14
|
|
|
15
15
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
16
16
|
of this software and associated documentation files (the "Software"), to deal
|
{finalsa_common_http_client-0.0.5 → finalsa_common_http_client-0.0.7}/finalsa/http/_shared.py
RENAMED
|
@@ -21,7 +21,7 @@ class InternalHttpError(BaseDomainException):
|
|
|
21
21
|
|
|
22
22
|
def __init__(self, response_code: int | None = None):
|
|
23
23
|
super().__init__(
|
|
24
|
-
message="Internal HTTP error",
|
|
24
|
+
message=f"Internal HTTP error: {response_code}",
|
|
25
25
|
response_code=response_code or self.response_code,
|
|
26
26
|
name="InternalHttpError"
|
|
27
27
|
)
|
|
@@ -81,8 +81,7 @@ class BaseAsyncHttpClient:
|
|
|
81
81
|
if "Content-Type" in headers and headers["Content-Type"] == "application/json":
|
|
82
82
|
data = await response.json()
|
|
83
83
|
shared.raise_for_response(data, response.status)
|
|
84
|
-
|
|
85
|
-
raise shared.InternalHttpError(response.status)
|
|
84
|
+
raise shared.InternalHttpError(response.status)
|
|
86
85
|
|
|
87
86
|
async def request(
|
|
88
87
|
self,
|
|
@@ -4,7 +4,6 @@ from collections.abc import Mapping
|
|
|
4
4
|
from typing import Any
|
|
5
5
|
|
|
6
6
|
import requests
|
|
7
|
-
from finalsa.common.models import BaseDomainException
|
|
8
7
|
|
|
9
8
|
from finalsa.http import _shared as shared
|
|
10
9
|
|
|
@@ -117,12 +116,7 @@ class BaseSyncHttpClient:
|
|
|
117
116
|
except requests.RequestException as e:
|
|
118
117
|
if e.response is not None and "Content-Type" in e.response.headers and e.response.headers["Content-Type"] == "application/json":
|
|
119
118
|
data = e.response.json()
|
|
120
|
-
|
|
121
|
-
raise BaseDomainException(
|
|
122
|
-
message=data.get("message"),
|
|
123
|
-
response_code=e.response.status_code,
|
|
124
|
-
name=data.get("name")
|
|
125
|
-
) from e
|
|
119
|
+
shared.raise_for_response(data, e.response.status_code)
|
|
126
120
|
raise e
|
|
127
121
|
|
|
128
122
|
def get(self, path: str, **kwargs: Any) -> requests.Response:
|
|
File without changes
|
|
File without changes
|
{finalsa_common_http_client-0.0.5 → finalsa_common_http_client-0.0.7}/finalsa/http/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|