Hacker News new | ask | show | jobs
by ljnelson 28 days ago
Many comments so far seem to imply (perhaps not intentionally) that this syntax was intended only on the "right side" of the URI, but you can think of it more as adding qualifier-like information to (potentially) each path segment. So in /com/foo/bar you could further qualify foo (perhaps as /com/foo;color=yellow/bar). This can be combined with a (definitionally trailing) query string as well. Someone noted that Spring implements some support for this; the Eclipse Foundation's Jersey (Java REST toolkit) does as well if I remember right.
1 comments

That's how I use matrix params in one of my Angular projects - these are very handy to put segment filter params into instead of query params. When you have parallel routes (page/dialog) and filtering everywhere, URLs stay much easier to reason about.