File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -63,6 +63,9 @@ def __init__(
6363 # CookieJar containing all currently outstanding cookies set on this session
6464 self .cookies = cookiejar_from_dict ({})
6565
66+ # Timeout
67+ self .timeout_seconds = 30
68+
6669 # --- Advanced Settings ----------------------------------------------------------------------------------------
6770
6871 # Examples:
@@ -275,7 +278,7 @@ def execute_request(
275278 json : Optional [dict ] = None , # Optional[dict]
276279 allow_redirects : Optional [bool ] = False ,
277280 insecure_skip_verify : Optional [bool ] = False ,
278- timeout_seconds : Optional [int ] = 30 ,
281+ timeout_seconds : Optional [int ] = None ,
279282 proxy : Optional [dict ] = None # Optional[dict[str, str]]
280283 ):
281284 # --- URL ------------------------------------------------------------------------------------------------------
@@ -332,6 +335,11 @@ def execute_request(
332335 else :
333336 proxy = ""
334337
338+ # --- Timeout --------------------------------------------------------------------------------------------------
339+ # maximum time to wait
340+
341+ timeout_seconds = self .timeout_seconds or timeout_seconds
342+
335343 # --- Request --------------------------------------------------------------------------------------------------
336344 is_byte_request = isinstance (request_body , (bytes , bytearray ))
337345 request_payload = {
You can’t perform that action at this time.
0 commit comments