up
This commit is contained in:
parent
f123e928c2
commit
5cf0344b23
@ -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"`
|
||||
|
||||
Loading…
Reference in New Issue
Block a user