diff --git a/docs_src/src/pages/documentation/zh/api_reference/request_object.mdx b/docs_src/src/pages/documentation/zh/api_reference/request_object.mdx index 1dc984b6..4b201ffe 100644 --- a/docs_src/src/pages/documentation/zh/api_reference/request_object.mdx +++ b/docs_src/src/pages/documentation/zh/api_reference/request_object.mdx @@ -87,8 +87,10 @@ Robyn 支持通过 `*extra` 语法捕获额外的路径参数,这样可以捕 例如,如果有这样一个路由: - ```python @app.get("/sync/extra/*extra") def sync_param_extra(request: - Request): extra = request.path_params["extra"] return extra ``` + ```python + @app.get("/sync/extra/*extra") def sync_param_extra(request: Request): + extra = request.path_params["extra"] + return extra 在 `/sync/extra/` 后的任何路径段都会被捕获到 `extra` 参数中。例如: