Skip to content
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

serveRedirect parameter order #16

Closed
ghost opened this issue Feb 13, 2023 · 1 comment
Closed

serveRedirect parameter order #16

ghost opened this issue Feb 13, 2023 · 1 comment
Assignees

Comments

@ghost
Copy link

ghost commented Feb 13, 2023

The other two serve* functions that take a status put it as the first argument while serveRedirect puts it last. Is there any interest in changing to serveRedirect(status, loc) or putting status last for the other two?

@pkulchenko pkulchenko self-assigned this Feb 13, 2023
@pkulchenko
Copy link
Owner

That's interesting. The main reason for the re-ordering was that the status code is optional for the redirect, but I also made it optional for serveResponse too. I'm considering changing the order, but still accepting the current one. Thank you for the suggestion!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant