What's the difference between of `$request->params()` and `$request->query()`

I’m trying to access the query parameters in the current URL. The $request object accessed through $kirby->request() seems to be what I’m looking for. The Kirby\Http\Request object has two methods that both look like they should provide access to query parameters: $request->params() and $request->query(). Both of those lack documentation, so it’s difficult to tell which is the correct one to use.

$request->query() does provide access query parameters, while $request->params() always returns an empty Kirby\Http\Params object, regardless of the current URL. I thought maybe the params() method might be used to access body parameters in a POST request, but it doesn’t do that either (besides, the body parameters can be accessed using $request->data()).

What’s the purpose of the $request->params() method?

params: http://yourdomain.test/tag:sometag
query: http://yourdomain.test?query=somequery

Thanks for the explanation! I found the documentation for the param() function which explains the syntax. Maybe this should be clarified in the documentation for the $request()->params() method? Without knowing that params is Kirby lingo referring to some special syntax in the URL’s path component, this is very misleading. Just looking at the $request documentation, seeing a params() method that doesn’t return URL parameters is really confusing if you’re new to Kirby.