Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

是否可以增加自定义HTTP驱动,在Laravel中我想要使用框架的HTTP客户端 #2867

Closed
caixingyue opened this issue Dec 13, 2024 · 1 comment

Comments

@caixingyue
Copy link

我用的环境

  • PHP 版本:8.x
  • overtrue/wechat 版本:6.x
  • 是否使用了框架?框架名称:Laravel

问题及现象

是否可以增加自定义HTTP驱动,在Laravel中我想要使用框架的HTTP客户端。因为HTTP客户端提供事件监听,我会通过这个完成请求响应报文的记录

@lyt8384
Copy link
Contributor

lyt8384 commented Jan 2, 2025

$app->setHttpClient() 不是可以使用自定义的http驱动么。不过Laravel的HTTP看了下应该要自己写一个类去实现下Symfony\Contracts\HttpClient\HttpClientInterface 才行

@overtrue overtrue closed this as completed Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants