Instantly share code, notes, and snippets.

Embed
What would you like to do?
require 'rubygems'
require 'sinatra'
require 'builder'
get '/hi' do
builder do |html|
html.h1 "Frist Post"
html.form("action" => "boo", "method" => "post") do
html.input("type" => "submit", "id" => "submit")
end
end
end
post '/boo' do
redirect "http://#{request.host_with_port}/bar"
end
get '/bar' do
"getted"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment