homebridge-hubitat-makerapi
homebridge-hubitat-makerapi copied to clipboard
Introduce support for `https:` in util_http.
Currently, the plugin doesn't support communicating with a Hubitat hub using SSL exclusively, as documented in this community post. This PR introduces support in util_http.js
to detect that an https:
URL protocol is configured in the plugin's app_url
and makes the appropriate adjustments for that.
- parse
protocol
from URL - use protocol to default
app_port
to 80 | 443 - Use node's 'https' lib if protocol is https