Skip to content

Commit 42c7cc7

Browse files
adding setter for HttpEndpoint
1 parent 6619038 commit 42c7cc7

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

socketlabs/injectionapi/socketlabsclient.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ def __init__(self, server_id: int, api_key: str, proxy: Proxy = None):
3838
self._http_proxy = proxy
3939
self._request_timeout = 120
4040
self._number_of_retries = 0
41+
self._http_endpoint = HttpEndpoint("inject.socketlabs.com", "/api/v1/email")
4142

4243
@property
4344
def __endpoint(self):
@@ -46,7 +47,16 @@ def __endpoint(self):
4647
:return the Http Endpoint for the request
4748
:rtype HttpEndpoint
4849
"""
49-
return HttpEndpoint("inject.socketlabs.com", "/api/v1/email")
50+
return self._http_endpoint
51+
52+
@property.setter
53+
def __endpoint(self, http_endpoint: HttpEndpoint):
54+
"""
55+
The SocketLabs Injection API endpoint
56+
:return the Http Endpoint for the request
57+
:rtype HttpEndpoint
58+
"""
59+
self._http_endpoint = http_endpoint
5060

5161
@property
5262
def __proxy(self):

0 commit comments

Comments
 (0)