rexyai / RestRserve

R web API framework for building high-performance microservices and app backends
https://restrserve.org
276 stars 32 forks source link

[BUG] Router doesn't match parametrized path #147

Closed dselivanov closed 4 years ago

dselivanov commented 4 years ago

Doesn't work

rt = RestRserve:::Router$new()
rt$add_path("/{p1}/{p2}", match = "regex", id = '1')
rt$match_path("/a/b")

NULL

Works

rt$add_path("/p/{p1}/{p2}", match = "regex", id = '1')
rt$match_path("/p/a/b")

[1] "1" attr(,"parameters_path") attr(,"parameters_path")$p1 [1] "a" attr(,"parameters_path")$p2 [1] "b"