From 825508ed03535aa48be6c9db23ef5efdfd1d4d9c Mon Sep 17 00:00:00 2001 From: Vegard Engen Date: Mon, 14 Apr 2025 08:19:06 +0200 Subject: [PATCH] debugging --- unifi/unifi.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/unifi/unifi.go b/unifi/unifi.go index 6663fa9..e9ff9f9 100644 --- a/unifi/unifi.go +++ b/unifi/unifi.go @@ -13,6 +13,7 @@ import ( "path" "strings" "sync" + "log" ) const ( @@ -273,7 +274,9 @@ func (c *Client) do(ctx context.Context, method, relativeURL string, reqBody int } // TODO: check rc in addition to status code? - + + log.Printf("%+v", respBody) + log.Printf("%+v", resp.Body) err = json.NewDecoder(resp.Body).Decode(respBody) if err != nil { return fmt.Errorf("unable to decode body: %s %s %w", method, relativeURL, err)