http-rs / http-rs/route-recognizer

Cannot capture full urls as params

Open
#55 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
101
Forks
35
PR merge metrics
No merged PRs in 30d

Description

Hey there, thanks for this cool library :)

I'm writing an application that needs to capture params that are paths. Is it possible to do it?

Example

```rust
router.add(
"/delete/:path",
DeleteFileScreen
);
```

Then I'd like to match something like this:

```rust
match router.recognize("/delete/home/user/example/foo/bar")
```
Essentially I would like something like Flask's PATH url converter: https://flask.palletsprojects.com/en/2.0.x/quickstart/#variable-rules.

Thank you

Contributor guide

Open the contributing guide

Research direction

Start at the router.add and router.recognize entry points shown in the issue, and trace how dynamic URL segments are matched. Confirm the intended behavior using the /delete/:path example, including paths with multiple slash-separated segments. Done means recognizing /delete/home/user/example/foo/bar and exposing the captured path parameter.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
backend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.