Sha256: 39d8dd544bc0dcf5147a134957437a176a91621d17629cc4eb3a9173ea068cb2
Contents?: true
Size: 639 Bytes
Versions: 14
Compression:
Stored size: 639 Bytes
Contents
require 'yaml' require 'sinatra' require 'sinatra/contrib' set :logging, false get '/' do env['REQUEST_METHOD'].downcase + params.to_s end get '/submit' do cookies.to_hash.to_yaml end get '/sleep' do sleep 2 <<-EOHTML <a href='?input=blah'>Inject here</a> #{cookies[:input]} EOHTML end get '/set_cookie' do cookies['my-cookie'] = 'my-val' '' end get '/with_other_elements' do cookies['mycookie'] ||= 'cookie val' <<HTML <a href='?link_name=link_val'>A link</a> <form action='?form_name=form_val'> <input name='input' /> <input name='input2' /> </form> HTML end
Version data entries
14 entries across 14 versions & 1 rubygems