saloon icon indicating copy to clipboard operation
saloon copied to clipboard

Faking a response - failed to match url

Open diogogomeswww opened this issue 1 year ago • 1 comments

First of all: thank you for your lovely package!

2 Questions:

  1. I'm using the Laravel HTTP plugin. So I was excepting not having to change my current tests where I'm using HTTP::fake. But I had to change all of them and use the MockClient approach.

  2. On my previous implementation using the HTTP::fake I was explicitly setting a full URL with all the parameters for a GET request. But with Saloon this is not possible. I was checking the implementation and it seems that you only check the url, and do not append the query params. So, it's not possible to check if we are passing the correct parameters to the endpoint. Happy to do a PR to add this if you want.

diogogomeswww avatar Feb 12 '24 17:02 diogogomeswww

Hey @diogogomeswww thank you for the compliment! ❤️

  1. The only benefit of using the Laravel HTTP Sender is the Laravel Telescope support. Otherwise, I don't think it provides as much value as I initially hoped it would - I will probably be deprecating this package in the future as I am working on a Saloon-replacement to Telescope.

  2. I'll see what I can do here! I am slightly worried about the breaking change suddenly expecting query parameters, but I'll see if I can get it working for you.

Sammyjo20 avatar Feb 14 '24 13:02 Sammyjo20

Hey @diogogomeswww I'm going to close this issue as it has been inactive for a little while, just doing some spring cleaning. Feel free to reopen if you have anything to add.

Sammyjo20 avatar May 14 '24 19:05 Sammyjo20