3 Commits

Author SHA1 Message Date
guy176251 1d19dbcac7 changed read only url back 2026-05-28 12:56:09 -05:00
guy176251 52bdbec89a added request headers to debug log 2026-05-28 06:46:57 -05:00
guy176251 57129fcb83 changed read only url 2026-05-28 06:13:09 -05:00
+1 -1
View File
@@ -349,7 +349,7 @@ func parseRate(r *http.Response) Rate {
// pointed to by v, or returned as an error if an API error has occurred. If v implements the io.Writer interface, // pointed to by v, or returned as an error if an API error has occurred. If v implements the io.Writer interface,
// the raw response will be written to v, without attempting to decode it. // the raw response will be written to v, without attempting to decode it.
func (c *Client) Do(ctx context.Context, req *http.Request, v interface{}) (*Response, error) { func (c *Client) Do(ctx context.Context, req *http.Request, v interface{}) (*Response, error) {
slog.Debug("Making API request to reddit", "url", req.URL.String(), "method", req.Method) slog.Debug("Making API request to reddit", "url", req.URL.String(), "method", req.Method, "headers", req.Header)
if err := c.checkRateLimitBeforeDo(req); err != nil { if err := c.checkRateLimitBeforeDo(req); err != nil {
return &Response{ return &Response{
Response: err.Response, Response: err.Response,