cleanup, docs

This commit is contained in:
root
2026-06-16 12:21:31 +00:00
parent dff1959341
commit ea08d5f28b
296 changed files with 1571 additions and 1940 deletions
+5 -8
View File
@@ -1,10 +1,8 @@
:title
request_query_route
:sig
DValue request_query_route(Request& context, String default_path = "index")
:see
>uri
request_query_path
request_context_params
route_path_sanitize
@@ -20,10 +18,9 @@ Fields:
- `page`: first path segment of `l_path`, or empty string when input was rejected
- `valid`: boolean; true when `l_path` is safe
```cpp
DValue route = request_query_route(context);
if(route["valid"].to_bool())
print("route=", route["l_path"].to_string());
```
This supports front-controller apps that use URLs such as `/?dashboard` or `/?workspace/projects` while still allowing ordinary named query parameters alongside the route. The returned `l_path` is already sanitized for composing under an application-controlled route root.
:example
DValue route = request_query_route(context, "index");
print(route.is_array() ? "route\n" : "empty\n");