Merge pull request #26 from Vinalti/add-ssl_verify-param
Add ssl_verify param
This commit is contained in:
commit
31fe4466a2
1 changed files with 6 additions and 2 deletions
|
@ -357,18 +357,22 @@ class UptimeKumaApi(object):
|
||||||
:param str url: The url to the Uptime Kuma instance. For example ``http://127.0.0.1:3001``
|
:param str url: The url to the Uptime Kuma instance. For example ``http://127.0.0.1:3001``
|
||||||
:param float wait_timeout: How many seconds the client should wait for the connection., defaults to 1
|
:param float wait_timeout: How many seconds the client should wait for the connection., defaults to 1
|
||||||
:param dict headers: Headers that are passed to the socketio connection, defaults to None
|
:param dict headers: Headers that are passed to the socketio connection, defaults to None
|
||||||
|
:param bool ssl_verify: ``True`` to verify SSL certificates, or ``False`` to skip SSL certificate
|
||||||
|
verification, allowing connections to servers with self signed certificates.
|
||||||
|
Default is ``True``.
|
||||||
:raises UptimeKumaException: When connection to server failed.
|
:raises UptimeKumaException: When connection to server failed.
|
||||||
"""
|
"""
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
url: str,
|
url: str,
|
||||||
wait_timeout: float = 1,
|
wait_timeout: float = 1,
|
||||||
headers: dict = None
|
headers: dict = None,
|
||||||
|
ssl_verify: bool = True
|
||||||
) -> None:
|
) -> None:
|
||||||
self.url = url
|
self.url = url
|
||||||
self.wait_timeout = wait_timeout
|
self.wait_timeout = wait_timeout
|
||||||
self.headers = headers
|
self.headers = headers
|
||||||
self.sio = socketio.Client()
|
self.sio = socketio.Client(ssl_verify=ssl_verify)
|
||||||
|
|
||||||
self._event_data: dict = {
|
self._event_data: dict = {
|
||||||
Event.MONITOR_LIST: None,
|
Event.MONITOR_LIST: None,
|
||||||
|
|
Loading…
Reference in a new issue