File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed
.generator/src/generator/templates Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -266,6 +266,13 @@ class AsyncRESTClientObject:
266
266
(connection, read) timeouts.
267
267
"""
268
268
assert not post_params, "not supported for now"
269
+ if request_timeout is not None:
270
+ from aiosonic.timeout import Timeouts # type: ignore
271
+
272
+ if isinstance(request_timeout, (int, float)):
273
+ request_timeout = Timeouts(request_timeout=request_timeout)
274
+ else:
275
+ request_timeout = Timeouts(sock_connect=request_timeout[0], sock_read=request_timeout[1])
269
276
request_body = None
270
277
if (
271
278
"Content-Type" not in headers
Original file line number Diff line number Diff line change @@ -268,6 +268,13 @@ async def request(
268
268
(connection, read) timeouts.
269
269
"""
270
270
assert not post_params , "not supported for now"
271
+ if request_timeout is not None :
272
+ from aiosonic .timeout import Timeouts # type: ignore
273
+
274
+ if isinstance (request_timeout , (int , float )):
275
+ request_timeout = Timeouts (request_timeout = request_timeout )
276
+ else :
277
+ request_timeout = Timeouts (sock_connect = request_timeout [0 ], sock_read = request_timeout [1 ])
271
278
request_body = None
272
279
if (
273
280
"Content-Type" not in headers
You can’t perform that action at this time.
0 commit comments