mirror of
https://github.com/jwilsson/spotify-web-api-php.git
synced 2026-04-27 07:55:49 +03:00
[GH-ISSUE #159] custom curl options by user #102
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#102
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 @csimpi on GitHub (Jun 21, 2019).
Original GitHub issue: https://github.com/jwilsson/spotify-web-api-php/issues/159
Hi,
thx for your awesome work!
I'd like to set some curl options. I can't change
Request.phpin thevendorfolder for obvious reason.Is it possible to set/overwrite the
$optionsarray from my code? If it's not it would be an awesome (and must-have) feature.Currently, I'm getting timeout error messages randomly when I'm connecting to api.spotify.com, I'd need to set the curl connection timeout option and fine-tune the request-response frequency.
@csimpi commented on GitHub (Jun 22, 2019):
A quick workaround, using Guzzle instead of curl with this adapter:
https://github.com/andig/spotify-web-api-extensions
@jwilsson commented on GitHub (Jun 26, 2019):
Hey!
Sorry for the late answer!
Sounds like a valid use case, I'll take a look at it over the weekend.
@csimpi commented on GitHub (Jun 26, 2019):
@jwilsson
Thank you!
I think the best way would be making an adapter for the curl part with an opportunity to use any kind of external HTTP Clients.
Also, I'd recommend using Guzzle instead of curl. Curl has a lot of problems on several servers, lots of memory leaking problems, etc. Now that I have overridden the Request class and using Guzzle HTTP every other random issue has been disappeared (even behind a proxy).
@jwilsson commented on GitHub (Jun 27, 2019):
@csimpi Absolutely, I agree! It's definitely something I've thought about and will look into for the next major release.