Closed Radon8472 closed 1 year ago
Hi @Radon8472, sorry that we didn't react to this issue earlier. @JanEbbing has been working on this feature, you can see the work in this comment.
This is implemented now in the new v1.5.0, please update to use this feature (and feel free to provide any feedback).
Hi @Radon8472, sorry that we didn't react to this issue earlier. @JanEbbing has been working on this feature, you can see the work in this comment.
@JanEbbing , @daniel-jones-deepl
I tested this feature in v1.5, but unfortunally it still has some bugs. I created a new issue #29 for this, because it seems to be another context
Currently you are using a static internal http client based on curl. It would be good if there would be an option to set an alternative http client (e.g. guzzlephp, php streams or any psr18 compatible client).
This would be usefull e.g. when you can`t use curl, or when you are using any framework with its own httpclient.
I would suggest to add a new option to the options array e.g.
The option
httpClient
should accept any client matching to an from predefined defined "HttpClientInterface" and you change your code to only use HttpClientInterface to be compatible with all comming implementations on this interface.Benefit would be, you only need to implement the basic logic of passing new clients based on this interface, createing different clients could be done by the community.
examples how this could be done can be found in other projects using changeable http clients like here
EDIT: This feature would automatically resolve #14 because you could ad or change an alternative curl client with custom config.