Open gacolitti opened 5 months ago
I want to be able to mount routers without a trailing slash. As far as I can tell, this is not supported.
Here is an example:
library(plumber) pr1 <- pr_get(pr(), "/", function() {}) pr() |> pr_mount("/api/test", pr1) |> pr_run(port = 8322)
I want the endpoint to be /api/test, but instead it becomes /api/test/ and I'm not sure how to remove the trailing slash.
/api/test
/api/test/
I tried doing:
pr1 <- pr_get(pr(), "", function() {})
but that returns the same endpoint as before.
Maybe there can be an additional argument to pr_mount() to control this behavior:
pr_mount()
pr_mount(ignore_trailing_slashes = TRUE)
I want to be able to mount routers without a trailing slash. As far as I can tell, this is not supported.
Here is an example:
I want the endpoint to be
/api/test
, but instead it becomes/api/test/
and I'm not sure how to remove the trailing slash.I tried doing:
but that returns the same endpoint as before.
Maybe there can be an additional argument to
pr_mount()
to control this behavior: