When parsing a URL if the path contains a query string at the end e.g. /api/something?a=b&c=d given a rule of /api/:what the value of the query string ends up being appended to parameter - in this example match.params["what"] == "something?a=b&c=d".
It would make sense to introduce the concept of the query string at least and remove it from the last match entry when producing the parameter map.