扩展Laravel HTTP立面
我正在尝试找到适当的方法来扩展Laravel HTTP客户幕立面。我不想每次都想从请求的响应中得到一些东西。我想添加更多的帮助者来防止这种情况。另外,我无法直接扩展客户,因为我使用宏观的外墙来减轻我的生活。
json_decode($this->getBody()->getContents())->id;
I'm trying to find the right way to extend the Laravel Http Client Facade. I don't want to do this every time when I want to get something from the response of my request. I would like to add some more helpers to prevent this. Also I can't directly extend the client, because I'm using the facade with a macro to ease my life.
json_decode($this->getBody()->getContents())->id;
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这已经是内置于客户端。
甚至:
This is already built into the client.
Or even: