I'm using Guzzle I'm having troubles with on_redirect.
I have basic sample here:
$client = new Client([
'handler' => $stack,
'allow_redirects' => [
'on_redirect' => function () {echo '123';},
'track_redirects' => true, ],
]);
And it's not working.
Redirect middleware is included.
Can somebody please explain me what am I doing wrong?