httpr 0.1.10__cp39-abi3-macosx_10_12_x86_64.whl → 0.1.11__cp39-abi3-macosx_10_12_x86_64.whl
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.
Potentially problematic release.
This version of httpr might be problematic. Click here for more details.
httpr/__init__.py
CHANGED
|
@@ -80,6 +80,10 @@ class Client(RClient):
|
|
|
80
80
|
# Validate the HTTP method. Raise an exception if it's not supported.
|
|
81
81
|
if method not in ["GET", "HEAD", "OPTIONS", "DELETE", "POST", "PUT", "PATCH"]:
|
|
82
82
|
raise ValueError(f"Unsupported HTTP method: {method}")
|
|
83
|
+
# Convert all params values to strings if params is present
|
|
84
|
+
if "params" in kwargs and kwargs["params"] is not None:
|
|
85
|
+
kwargs["params"] = {k: str(v) for k, v in kwargs["params"].items()}
|
|
86
|
+
|
|
83
87
|
return super().request(method=method, url=url, **kwargs)
|
|
84
88
|
|
|
85
89
|
def get(self, url: str, **kwargs: Unpack[RequestParams]) -> Response:
|
|
@@ -123,6 +127,12 @@ class AsyncClient(Client):
|
|
|
123
127
|
return await loop.run_in_executor(None, partial(fn, *args, **kwargs))
|
|
124
128
|
|
|
125
129
|
async def request(self, method: HttpMethod, url: str, **kwargs: Unpack[RequestParams]): # type: ignore
|
|
130
|
+
if method not in ["GET", "HEAD", "OPTIONS", "DELETE", "POST", "PUT", "PATCH"]:
|
|
131
|
+
raise ValueError(f"Unsupported HTTP method: {method}")
|
|
132
|
+
# Convert all params values to strings if params is present
|
|
133
|
+
if "params" in kwargs and kwargs["params"] is not None:
|
|
134
|
+
kwargs["params"] = {k: str(v) for k, v in kwargs["params"].items()}
|
|
135
|
+
|
|
126
136
|
return await self._run_sync_asyncio(super().request, method=method, url=url, **kwargs)
|
|
127
137
|
|
|
128
138
|
async def get(self, url: str, **kwargs: Unpack[RequestParams]): # type: ignore
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
httpr-0.1.11.dist-info/METADATA,sha256=IEdZ1qdpWho5iWj5_AUCyOwwXUl6Q_KPh02RFn8JSXs,12387
|
|
2
|
+
httpr-0.1.11.dist-info/WHEEL,sha256=7i3kT51faNtabvksQ6c95axGmX09r84hG9KJEu4eq5Y,104
|
|
3
|
+
httpr-0.1.11.dist-info/licenses/LICENSE,sha256=ZPD9tCar0h91tI4v-TuZdrjDdLqzU4rzPTxtP3x--uc,1063
|
|
4
|
+
httpr/__init__.py,sha256=WGZx_HtQdivDCLu7upDSwr-nQQpVXaFI4CX7vl7rFXg,9277
|
|
5
|
+
httpr/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
|
+
httpr/httpr.pyi,sha256=PYXORKm_hXjnVPhEBgzbTLY97lYM2ZK-TpmwZAj0d9c,3729
|
|
7
|
+
httpr/httpr.abi3.so,sha256=M0PiLTvFmjY5GJY9ERMbkCL65hzEJTf9tM7aXSKHy_E,4684408
|
|
8
|
+
httpr-0.1.11.dist-info/RECORD,,
|
httpr-0.1.10.dist-info/RECORD
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
httpr-0.1.10.dist-info/METADATA,sha256=Skee3JJUdd1MTYEvMwOyyBBwMWSwhstTTDQQ2RM92UQ,12387
|
|
2
|
-
httpr-0.1.10.dist-info/WHEEL,sha256=7i3kT51faNtabvksQ6c95axGmX09r84hG9KJEu4eq5Y,104
|
|
3
|
-
httpr-0.1.10.dist-info/licenses/LICENSE,sha256=ZPD9tCar0h91tI4v-TuZdrjDdLqzU4rzPTxtP3x--uc,1063
|
|
4
|
-
httpr/__init__.py,sha256=2AvAqECMH6euhi7kOacUDNZMSn3U0WvBW8KVPamg2-M,8689
|
|
5
|
-
httpr/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
|
-
httpr/httpr.pyi,sha256=PYXORKm_hXjnVPhEBgzbTLY97lYM2ZK-TpmwZAj0d9c,3729
|
|
7
|
-
httpr/httpr.abi3.so,sha256=M0PiLTvFmjY5GJY9ERMbkCL65hzEJTf9tM7aXSKHy_E,4684408
|
|
8
|
-
httpr-0.1.10.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|