sinatra Routing Available Sinatra Routing verbs


Example

There are a number of available routing verbs in Sinatra, they correspond directly to http verbs

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