In a subsection of the buildHTTPClient function which previously lived in the sendPostRequest method for the API server, I load in the server CA certificate, which I am not sure I need.
The way I have implemented buildHTTPClient function, it will first try to generate an HTTPS client, and if it fails reading the keys it will instead generate an HTTP client with an error describing as much, and those errors will get picked out of the sendPostRequest function and ignored with appropriate logging. Is this an acceptable implementation? Or if the user specifies they want an HTTPS sessions, and it fails, should the API server just fail to spin?
Addresses: #361 Looking for feedback:
sendPostRequest
method for the API server, I load in the server CA certificate, which I am not sure I need.Changes:
PTAL @vishnoianil @nerdalert