Skip to content

Commit 8618cf8

Browse files
added request timeout property
1 parent c37a70f commit 8618cf8

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

python-examples/basic/basic_send_with_proxy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
api_key = os.environ.get('SOCKETLABS_INJECTION_API_KEY')
2727

2828
# create the proxy
29-
proxy = Proxy("127.0.0.1", 8888)
29+
proxy = Proxy("127.0.0.1", 4433)
3030

3131
# create the client
3232
client = SocketLabsClient(server_id, api_key, proxy)

socketlabs/injectionapi/socketlabsclient.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ def __init__(self, server_id: int, api_key: str, proxy: Proxy = None):
3131
self._server_id = server_id
3232
self._api_key = api_key
3333
self._http_proxy = proxy
34+
self._request_timeout = 120
3435

3536
@property
3637
def __endpoint(self):
@@ -49,6 +50,14 @@ def __proxy(self):
4950
:rtype Proxy
5051
"""
5152
return self._http_proxy
53+
54+
@property
55+
def __request_timeout(self):
56+
return self._request_timeout
57+
58+
@__request_timeout.setter
59+
def __request_timeout(self, request_timeout):
60+
self._request_timeout = request_timeout
5261

5362
def __build_http_request(self):
5463
"""

0 commit comments

Comments
 (0)