Class: RequestHandler

Inherits:
Object show all
Defined in:
lib/volt/server/request_handler.rb

Instance Method Summary collapse

Instance Method Details

#call(env) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
# File 'lib/volt/server/request_handler.rb', line 4

def call(env)
  req = Rack::Request.new(env)
  # puts env.inspect
  # puts req.inspect

  puts req.path
  req.post?
  puts req.params["data"]

  # puts "ENV: #{env.inspect}"
  [200, {"Content-Type" => "text/html"}, StringIO.new("Hello Rack!")]
end