Reputation: 110
I'm trying to match all routes in a Nancy module. Sinatra uses splat parameters, e.g
get '/download/*.*' do
# matches /download/path/to/file.xml
params[:splat] # => ["path/to/file", "xml"]
end
Does this exist in Nancy?
Upvotes: 1
Views: 336
Reputation: 26599
This is covered in the docs - have a look at the greedy node:
https://github.com/NancyFx/Nancy/wiki/Defining-routes
Upvotes: 3