Changes cli to be protocol agnostic and defines https on config file

This commit is contained in:
Sergi Delgado Segura
2020-02-13 19:00:15 +01:00
parent 3ba5db533d
commit 43975df894
2 changed files with 4 additions and 4 deletions

View File

@@ -235,7 +235,7 @@ def post_appointment(data):
logger.info("Sending appointment to PISA")
try:
add_appointment_endpoint = "http://{}:{}".format(pisa_api_server, pisa_api_port)
add_appointment_endpoint = "{}:{}".format(pisa_api_server, pisa_api_port)
return requests.post(url=add_appointment_endpoint, json=json.dumps(data), timeout=5)
except ConnectTimeout:
@@ -337,7 +337,7 @@ def get_appointment(locator):
logger.error("The provided locator is not valid", locator=locator)
return None
get_appointment_endpoint = "http://{}:{}/get_appointment".format(pisa_api_server, pisa_api_port)
get_appointment_endpoint = "{}:{}/get_appointment".format(pisa_api_server, pisa_api_port)
parameters = "?locator={}".format(locator)
try: