|
@ -57,19 +57,18 @@ def get_response(url): |
|
|
response = session.post("%s%s" % (base_url, path), params) |
|
|
response = session.post("%s%s" % (base_url, path), params) |
|
|
return response.status_code, response.headers, response.content |
|
|
return response.status_code, response.headers, response.content |
|
|
except Exception as exception: |
|
|
except Exception as exception: |
|
|
|
|
|
custom_cert = config.get("muk_custom_certificate", False) |
|
|
|
|
|
_logger.info("Using Certificate: {}".format(custom_cert)) |
|
|
try: |
|
|
try: |
|
|
custom_cert = config.get("muk_custom_certificate", False) |
|
|
|
|
|
_logger.info("Using Certificate: {}".format(custom_cert)) |
|
|
|
|
|
|
|
|
response = session.post("%s%s" % (base_url, path), params, verify=custom_cert) |
|
|
|
|
|
return response.status_code, response.headers, response.reason |
|
|
|
|
|
except Exception as e: |
|
|
try: |
|
|
try: |
|
|
response = session.post("%s%s" % (base_url, path), params, verify=custom_cert) |
|
|
|
|
|
|
|
|
response = session.post("%s%s" % (base_url, path), params, verify=False) |
|
|
return response.status_code, response.headers, response.reason |
|
|
return response.status_code, response.headers, response.reason |
|
|
except Exception as e: |
|
|
except Exception as e: |
|
|
try: |
|
|
|
|
|
response = session.post("%s%s" % (base_url, path), params, verify=False) |
|
|
|
|
|
return response.status_code, response.headers, response.reason |
|
|
|
|
|
except Exception as e: |
|
|
|
|
|
_logger.exception("Request failed!") |
|
|
|
|
|
return 501, [], str(e) |
|
|
|
|
|
|
|
|
_logger.exception("Request failed!") |
|
|
|
|
|
return 501, [], str(e) |
|
|
else: |
|
|
else: |
|
|
try: |
|
|
try: |
|
|
response = requests.get(url) |
|
|
response = requests.get(url) |
|
|