Commit b87f3794 by Solo Group

auto-push

1 parent fbbcce8b
......@@ -27,17 +27,26 @@ class Vendor(VendorClass):
headers = {'Authorization': 'Bearer {key}'.format(key=self.auth)}
data = json.dumps(params)
self.url = url and self.url + url or self.url
with requests.session():
resp = requests.post(self.url, data=data,
verify=False, headers=headers)
try:
with requests.session():
resp = requests.post(self.url, data=data,
verify=False, headers=headers)
except:
resp = None
return resp
def request_get(self, params, url=None):
headers = {'Authorization': 'Bearer {key}'.format(key=self.auth)}
self.url = url and self.url + url or self.url
with requests.session():
resp = requests.get(self.url, params=params,
try:
with requests.session():
resp = requests.get(self.url, params=params,
verify=False, headers=headers)
except:
resp = None
return resp
def inquiry(self):
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!