mirror of
https://github.com/sinatra/sinatra
synced 2023-03-27 23:18:01 -04:00
Added optional parameter info to the README
This commit is contained in:
parent
5b9d3dae7e
commit
f5b1de9b1d
1 changed files with 6 additions and 0 deletions
|
@ -98,6 +98,12 @@ Or with a block parameter:
|
|||
"Hello, #{c}!"
|
||||
end
|
||||
|
||||
Route patterns may have optional parameters:
|
||||
|
||||
get '/posts.?:format?' do
|
||||
# matches "GET /posts" and any extension "GET /posts.json", "GET /posts.xml" etc.
|
||||
end
|
||||
|
||||
=== Conditions
|
||||
|
||||
Routes may include a variety of matching conditions, such as the user agent:
|
||||
|
|
Loading…
Reference in a new issue