@@ -52,12 +52,12 @@ def __init__(
52
52
bearer_token = bearer_token
53
53
)
54
54
self .access_token = self .__client_oauth .token
55
-
55
+
56
56
self .__client = OAuth2Session (self .__client_oauth .client_id ,
57
57
token = self .__client_oauth .token )
58
58
59
59
@renew_access_token
60
- def get (self , url_endpoint : str , headers = None ):
60
+ def get (self , url_endpoint : str , headers = None , verify_ssl = True ):
61
61
"""Gets the url_endpopint.
62
62
63
63
Args:
@@ -68,10 +68,10 @@ def get(self, url_endpoint: str, headers=None):
68
68
"""
69
69
if headers is None :
70
70
headers = {}
71
- return self .__client .get (url_endpoint , headers = headers )
71
+ return self .__client .get (url_endpoint , headers = headers , verify = verify_ssl )
72
72
73
73
@renew_access_token
74
- def post (self , url_endpoint : str , payload : dict , headers = None ):
74
+ def post (self , url_endpoint : str , payload : dict , headers = None , verify_ssl = True ):
75
75
"""Posts payload to the url_endpoint.
76
76
77
77
Args:
@@ -83,10 +83,10 @@ def post(self, url_endpoint: str, payload: dict, headers=None):
83
83
"""
84
84
if headers is None :
85
85
headers = {}
86
- return self .__client .post (url_endpoint , json = payload , headers = headers )
86
+ return self .__client .post (url_endpoint , json = payload , headers = headers , verify = verify_ssl )
87
87
88
88
@renew_access_token
89
- def patch (self , url_endpoint : str , payload : dict ):
89
+ def patch (self , url_endpoint : str , payload : dict , verify_ssl = True ):
90
90
"""Patchs payload to the url_endpoint.
91
91
92
92
Args:
@@ -96,7 +96,7 @@ def patch(self, url_endpoint: str, payload: dict):
96
96
Returns:
97
97
A response object.
98
98
"""
99
- return self .__client .patch (url_endpoint , json = payload )
99
+ return self .__client .patch (url_endpoint , json = payload , verify = verify_ssl )
100
100
101
101
def get_access_token (self ):
102
102
"""Returns the access token.
0 commit comments