Closed mstfblci closed 1 month ago
Why wouldn't you just do
$myConnector->send(new RequestA($data));
$myConnector->send(new RequestB($data));
Thanks for the suggestion, but I agree with @craigpotter.
I don't think you should make additional requests inside a Saloon request. If you really need to do it, you can do the following inside of your request:
use Saloon\Http\PendingRequest;
public function boot(PendingRequest $pendingRequest)
{
$pendingRequest->getConnector()->send(new RequestB);
}
This above code would run before the initial request is sent.
Hi,
Sometimes, in some APIs, I need other requests to be sent along with a request.
We can build a structure like this:
This will make saloonphp more useful.