mirror of
https://github.com/jwilsson/spotify-web-api-php.git
synced 2026-04-27 16:05:51 +03:00
[GH-ISSUE #276] New feature: provide your own HTTP client? #204
Labels
No labels
bug
docs
enhancement
enhancement
enhancement
feedback wanted
good first issue
help wanted
help wanted
help wanted
invalid
pull-request
question
question
upstream
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/spotify-web-api-php#204
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 @adnweedon on GitHub (Jun 5, 2024).
Original GitHub issue: https://github.com/jwilsson/spotify-web-api-php/issues/276
I was just wondering whether you might be open to a change from using curl directly, to allowing an HTTP client to be optionally provided to the package? The primary use-case for us is that we have an instrumented Guzzle/PSR-18 client, which if the package could use it, would give us helpful performance/tracing/debugging information!
@jwilsson commented on GitHub (Jun 6, 2024):
Hey!
It is possible (albeit poorly documented) to pass your own
Requestinstance to the library, e.g.Let me just improve the docs a bit and add an additional helper or two and you'll be good to go!
@jwilsson commented on GitHub (Jun 6, 2024):
Added some additional docs with some helper methods that could some in useful, Passing a Custom Request Instance. Hope this helps!
And just to provide some additional background. Given the age of this project, adding "proper" PSR-18 etc. support feels like a bit much and not worth the effort and possible breakage. With that said however, I have been chipping away at a "V2" with much more modern PHP features, full support for PSR-18 and friends, plus better typings but it's a slow process 😅