From 19134aa756e1b0be76bbbdb6afec0b38317f12dd Mon Sep 17 00:00:00 2001 From: Alex Savin Date: Thu, 22 May 2025 00:09:44 -0400 Subject: [PATCH] Removed unnecessary cookies --- client.go | 7 ++----- vehicle.go | 4 ++-- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/client.go b/client.go index 2478829..81b1aa5 100644 --- a/client.go +++ b/client.go @@ -5,7 +5,6 @@ import ( "fmt" "io" "log/slog" - "net/http" "sync" "time" @@ -28,8 +27,7 @@ type Client struct { baseURL string credentials credentials httpClient *resty.Client - cookies []*http.Cookie - country string // + country string // USA | CA updateInterval int // 7200 fetchInterval int // 360 currentVin string @@ -821,7 +819,7 @@ func (c *Client) execute(requestUrl string, method string, params map[string]str "serviceRequestId": serviceRequestId, }). Get(pollingUrl) - + resBytes, _ := io.ReadAll(resp.Body) c.log.Debug("POLLING HTTP OUTPUT", "body", string(resBytes)) // {"success":false,"errorCode":"404-soa-unableToParseResponseBody","dataName":"errorResponse","data":{"errorLabel":"404-soa-unableToParseResponseBody","errorDescription":null}} @@ -851,7 +849,6 @@ func (c *Client) execute(requestUrl string, method string, params map[string]str time.Sleep(3 * time.Second) } } - // fmt.Printf("[DEBUG] HTTP OUTPUT >> %v\n", string([]byte(resp.Body()))) return resBytes diff --git a/vehicle.go b/vehicle.go index 756cf48..35503cc 100644 --- a/vehicle.go +++ b/vehicle.go @@ -179,8 +179,8 @@ type GeoLocation struct { // Door . type Door struct { - Position string - SubPosition string + Position string // front | rear | boot | enginehood + SubPosition string // right | left Status string Updated time.Time }