diff --git a/sharedfunctions.py b/sharedfunctions.py index 9209250..8c2e887 100755 --- a/sharedfunctions.py +++ b/sharedfunctions.py @@ -129,15 +129,15 @@ def callrestapi(reqval, reqtype, acceptType='application/json', contentType='app # call the rest api using the parameters passed in and the requests python library if reqtype=="get": - ret = requests.get(baseurl+reqval,headers=head,data=json_data) + ret = requests.get(baseurl+reqval,headers=head,data=json_data,verify=False) elif reqtype=="post": - ret = requests.post(baseurl+reqval,headers=head,data=json_data) + ret = requests.post(baseurl+reqval,headers=head,data=json_data,verify=False) elif reqtype=="delete": - ret = requests.delete(baseurl+reqval,headers=head,data=json_data) + ret = requests.delete(baseurl+reqval,headers=head,data=json_data,verify=False) elif reqtype=="put": - ret = requests.put(baseurl+reqval,headers=head,data=json_data) + ret = requests.put(baseurl+reqval,headers=head,data=json_data,verify=False) elif reqtype=="patch": - ret = requests.patch(baseurl+reqval,headers=head,data=json_data) + ret = requests.patch(baseurl+reqval,headers=head,data=json_data,verify=False) else: result=None print("NOTE: Invalid method") @@ -307,7 +307,7 @@ def getauthtoken(baseurl): head.update({"Authorization" : oaval}) # test a connection to rest api if it fails try using the refresh token to re-authenticate - r = requests.get(baseurl,headers=head) + r = requests.get(baseurl,headers=head,verify=False) if (400 <= r.status_code <=599): @@ -367,7 +367,7 @@ def getauthtoken(baseurl): # test a connection to rest api again if it fails exit # tell user to re-authenticate with the sas-viya CLI - r = requests.get(baseurl,headers=head) + r = requests.get(baseurl,headers=head,verify=False) if (400 <= r.status_code <=599): oaval=None