[wgem] allowing the user to give a custom name for the app

This commit is contained in:
Vinícius Moreira
2019-12-13 12:19:37 -03:00
parent af35b83d47
commit c07c6a0463
4 changed files with 74 additions and 39 deletions

View File

@@ -16,7 +16,7 @@ class HttpClient:
self.sleep = sleep
self.logger = logger
def get(self, url: str, params: dict = None, headers: dict = None, allow_redirects: bool = True):
def get(self, url: str, params: dict = None, headers: dict = None, allow_redirects: bool = True, ignore_ssl: bool = False):
cur_attempts = 1
while cur_attempts <= self.max_attempts:
@@ -31,6 +31,9 @@ class HttpClient:
if headers:
args['headers'] = headers
if ignore_ssl:
args['verify'] = False
res = self.session.get(url, **args)
if res.status_code == 200: