Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
sansyrox committed Aug 24, 2024
1 parent 8962bfc commit 05c529c
Showing 1 changed file with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,20 +52,23 @@ def sync_param_extra(request: Request):
extra = request.path_params["extra"]
return extra
```
</CodeGroup>

</CodeGroup>
Any additional path segments after `/sync/extra/` will be captured in the `extra` parameter. For instance:

- A request to `/sync/extra/foo/bar` would result in `extra = "foo/bar"`
- A request to `/sync/extra/123/456/789` would result in `extra = "123/456/789"`
<ul>
<li>
A request to `/sync/extra/foo/bar` would result in `extra = "foo/bar"`
</li>
<li>
A request to `/sync/extra/123/456/789` would result in `extra = "123/456/789"`
</li>
</ul>

You can access the extra path parameters through `request.path_params["extra"]` in your route handler.

This feature is particularly useful when you need to handle dynamic, nested routes or when you want to capture an unknown number of path segments.




</Col>
<Col sticky>

Expand Down

0 comments on commit 05c529c

Please sign in to comment.