timeout

1 parent b6c924d1
...@@ -92,7 +92,11 @@ class Doc(Transaction): ...@@ -92,7 +92,11 @@ class Doc(Transaction):
self.log_info("URL:{} timeout:{} detik".format(url, timeout)) self.log_info("URL:{} timeout:{} detik".format(url, timeout))
self.log_info("REQUEST {}".format(data)) self.log_info("REQUEST {}".format(data))
try:
results = requests.post(url, json=data, headers=headers, timeout=timeout) # data=jsondata, results = requests.post(url, json=data, headers=headers, timeout=timeout) # data=jsondata,
except Excetions as e:
print(e)
if results.status_code != 200: if results.status_code != 200:
self.log_error(results) self.log_error(results)
self.log_error(results.text) self.log_error(results.text)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!