Skip to content

Commit

Permalink
Update docs_src/src/pages/documentation/zh/api_reference/request_obje…
Browse files Browse the repository at this point in the history
…ct.mdx
  • Loading branch information
sansyrox authored Jan 14, 2025
1 parent 3d4d456 commit ee253ca
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,10 @@ Robyn 支持通过 `*extra` 语法捕获额外的路径参数,这样可以捕
例如,如果有这样一个路由:

<CodeGroup>
```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
</CodeGroup>

`/sync/extra/` 后的任何路径段都会被捕获到 `extra` 参数中。例如:
Expand Down

0 comments on commit ee253ca

Please sign in to comment.