Skip to content
Discussion options

You must be logged in to vote

Using a tail segment should be reasonably clean.

#[get("/data/{args}*")
pub async fn get_data(args: web::Path<String>) -> Result<HttpResponse, Error> {
  let args = args.split("/").collect::<Vec<_>>();
  ....
}

(untested snippet)

see https://docs.rs/actix-router/latest/actix_router/struct.ResourceDef.html#tail-segments

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by leo91000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants