I checked a few web frameworks like Laravel, Slim, express.js, etc. None of them has support for query string parameters. I wonder why this happened. I mean the query string is part of the URI and according to the URI standard the path contains the hierarchical and the query string the non-hierarchical part of the URI. Since the complete URI is the resource identifier, not just the path we should use the query string for routing as well. At least this is my logic. For example I think /people?search=keywords
is a completely valid resource identifier. Still what I can do with these frameworks is router.get('/people')
and then an if-else statement in the controller. So the question is what am I missing here, why is the query not part of the routing?