mirror of
https://github.com/aljazceru/python-teos.git
synced 2025-12-17 22:24:23 +01:00
Changes cli to be protocol agnostic and defines https on config file
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# PISA-WT-SERVER
|
||||
DEFAULT_PISA_API_SERVER = "teos.pisa.watch"
|
||||
DEFAULT_PISA_API_PORT = 9814
|
||||
DEFAULT_PISA_API_SERVER = "https://teos.pisa.watch"
|
||||
DEFAULT_PISA_API_PORT = 443
|
||||
|
||||
# WT-CLI
|
||||
DATA_FOLDER = "~/.wt_cli/"
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user