-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a redirect route shortcut #2425
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @ellotheth!
Please add a test that ensures that UriInterface
as $destination
also works.
This is correct. You should only change the response object on the way back anyway. |
@akrabat Righto, done! |
Can you also do this against the |
Yup, and I'll add the docs. Should be be done by tomorrow night. |
8d75908
to
5a321f2
Compare
Per a short conversation with @akrabat.
(I'm blanket overwriting whatever status code the
ResponseInterface
has because I wasn't sure the flexibility in e.g.Slim\Http\Response::withRedirect
is necessary at this level, but maybe it's worth keeping the behavior the same for consistency?)