Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

25 lines (19 sloc) 0.39 kb
require 'sinatra'
configure do
enable :sessions
set :session_secret , "blargggghhh"
end
get '/' do
@name = 'Session robot'
session[:blah] = "Argghhh!"
erb :default
end
get '/session' do
content_type :txt
session[:blah]
end
#send an attachment. the file type will be used to set the Content-Disposition header
get '/novel' do
attachment "OHHAI.txt"
"OH HAI, how are you??"
end
Jump to Line
Something went wrong with that request. Please try again.