mirror of
https://github.com/ramsayleung/rspotify.git
synced 2026-04-26 07:55:55 +03:00
[GH-ISSUE #527] Add reqwest-middleware support #170
Labels
No labels
Stale
bug
discussion
enhancement
good first issue
good first issue
help wanted
pull-request
question
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/rspotify#170
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @lazulit3 on GitHub (Jun 11, 2025).
Original GitHub issue: https://github.com/ramsayleung/rspotify/issues/527
Is your feature request related to a problem? Please describe.
I would like to use
reqwest-middlewarewith rspotify's reqwest client so that I can usehttp-cache-reqwestto cache my API responses.Describe the solution you'd like
Could we expand
rspotify-httpto supportreqwest-middleware?I suspect we could gate middleware support behind a feature flag.
Describe alternatives you've considered
rspotify's design (supporting varying HTTP clients), it does not appear possible to bring one's own HTTP client (e.g.pub(crate) http: HttpClient,)rspotifyas a workaround, but would prefer to depend on upstream: https://github.com/lazulit3/rspotify/tree/feat-reqwest-middlewareAdditional context
Supporting middleware on the
reqwestclient could be useful in many ways, but the big one is this would satisfy an option for caching API requests from Spotify (leveraging ETags). Related to:@lazulit3 commented on GitHub (Jun 11, 2025):
I've opened a PR with some WIP towards this that I'd like to share.
It probably needs more testing/docs/examples, and I would super appreciate help getting it over the finish line. Love y'all <3
@ramsayleung commented on GitHub (Jul 7, 2025):
Closing this issue as the PR #528 has been merged.