module Roda::RodaPlugins::Base::RequestMethods

def redirect(path=default_redirect_path, status=default_redirect_status)

end
end
r.redirect
# change state
r.post do

end
# show state
r.get do
r.is "foo" do

after changing:
returns the current state, and you want to show the current state
it easy to use where a +POST+ request to a URL changes state, +GET+
path if the request is not a +GET+ request. This is designed to make
If you do not provide a path, by default it will redirect to the same

response.status = 404 # not reached
r.redirect '/page2' # uses 302 status code
r.redirect '/page1', 301 if r['param'] == 'value1'

the processing of the request:
Immediately redirect to the path using the status code. This ends
def redirect(path=default_redirect_path, status=default_redirect_status)
  response.redirect(path, status)
  throw :halt, response.finish
end