mirror of
https://github.com/Xevion/go-ha.git
synced 2026-01-31 12:24:25 -06:00
two url fixes:
- default scheme for legacy connection params - set paths for http and websocket APIs
This commit is contained in:
@@ -18,6 +18,7 @@ type HttpClient struct {
|
||||
func NewHttpClient(url *url.URL, token string) *HttpClient {
|
||||
// Shallow copy the URL to avoid modifying the original
|
||||
u := *url
|
||||
u.Path = "/api"
|
||||
if u.Scheme == "ws" {
|
||||
u.Scheme = "http"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user