可用的 Sinatra 路由动词
Sinatra 中有许多可用的路由动词,它们直接对应于 http 动词
get '/' do
.. get some data, a view, json, etc ..
end
post '/' do
.. create a resource ..
end
put '/' do
.. replace a resource ..
end
patch '/' do
.. change a resource ..
end
delete '/' do
.. delete something ..
end
options '/' do
.. appease something ..
end
link '/' do
.. affiliate something ..
end
unlink '/' do
.. separate something ..
end