saloonphp / saloon

🤠 Build beautiful API integrations and SDKs with Saloon
https://docs.saloon.dev
MIT License
2.09k stars 107 forks source link

Change guzzle client creation (linked to PR in laravel-plugin) #403

Closed gdebrauwer closed 3 months ago

gdebrauwer commented 7 months ago

I noticed the laravel-http-sender package is being sunset, but I still want requests/responses to be logged in Telescope. Then I discovered this is possible with the following package: https://github.com/huzaifaarain/telescope-guzzle-watcher/tree/main

The problem is that this package only works if the guzzle client is created using the service container. That is currently not the case.

This PR and PR https://github.com/saloonphp/laravel-plugin/pull/62 make that possible with minimal changes.

pajkho commented 4 months ago

What is the status on this? Will it be merged in?

Sammyjo20 commented 3 months ago

The saloonphp/laravel-http-sender has been sunset but it will soon be replaced with a new package that @craigpotter is working on, Barstool - which will record all Saloon requests/responses for you. You can manually change the way the sender is resolved to use the service container with this guide:

https://docs.saloon.dev/conclusion/how-to-guides/improving-speed-with-laravel

pajkho commented 1 month ago

@Sammyjo20 I just wanted to check the status on this? What is the best way currently to get requests logged in Telescope?