From 5cf0344b234f26bbc65e95429c860da12a135daa Mon Sep 17 00:00:00 2001 From: cangui Date: Thu, 19 Jun 2025 20:19:13 +0200 Subject: [PATCH] up --- internal/debridlink/client.go | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/internal/debridlink/client.go b/internal/debridlink/client.go index 23c811e..c9e0961 100644 --- a/internal/debridlink/client.go +++ b/internal/debridlink/client.go @@ -319,6 +319,11 @@ func (c *Client) doJSON(ctx context.Context, method, path string, params url.Val return err } reqBody = bytes.NewReader(b) + + // 👇 DEBUG : afficher le body + log.Printf("➡️ [API %s] URL: %s\nBody: %s\n", method, urlStr, string(b)) + } else { + log.Printf("➡️ [API %s] URL: %s (empty body)", method, urlStr) } req, err := http.NewRequestWithContext(ctx, method, urlStr, reqBody) @@ -326,7 +331,11 @@ func (c *Client) doJSON(ctx context.Context, method, path string, params url.Val return err } - req.Header.Set("Authorization", "Bearer "+c.account.AccessToken) + // 👇 DEBUG : afficher le header Authorization + authHeader := "Bearer " + c.account.AccessToken + log.Printf("➡️ Authorization Header: %s\n", authHeader) + + req.Header.Set("Authorization", authHeader) req.Header.Set("Content-Type", "application/json") resp, err := c.http.Do(req) @@ -346,6 +355,7 @@ func (c *Client) doJSON(ctx context.Context, method, path string, params url.Val return nil } + // =========================== RSS =========================== type RSSFeed struct { ID string `json:"id" gorm:"column:id;primaryKey"`