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

Use req.path instead of req.pathname? #29

Closed
lukeed opened this issue Feb 16, 2018 · 2 comments
Closed

Use req.path instead of req.pathname? #29

lukeed opened this issue Feb 16, 2018 · 2 comments

Comments

@lukeed
Copy link
Owner

lukeed commented Feb 16, 2018

This would be breaking for Polka, but is probably okay considering we're still pre-1.0.

The "reason" for doing do is consistency / parity with Express --- a couple popular middleware use req.path for internal logic. If Polka is gunning for Express compatibility, it should probably do the same.

I'd also remove req.pathname since there's no point in having both keys.

@terkelg
Copy link

terkelg commented Mar 5, 2018

I prefer req.path - mostly because it's shorter and looks better but compatibility with is a huge win too.

@lukeed
Copy link
Owner Author

lukeed commented Mar 5, 2018

Yeah definitely. I think this is a must-have now, it's just a matter of when to make the change.

@lukeed lukeed added this to the 0.4.0 milestone Apr 22, 2018
@lukeed lukeed closed this as completed in 7d467f3 Apr 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants