Class: Sinatra::Request
- Inherits:
-
Rack::Request
- Object
- Rack::Request
- Sinatra::Request
- Defined in:
- lib/sinatra/base.rb
Instance Method Summary collapse
- #accept ⇒ Object
-
#params ⇒ Object
Override Rack 0.9.x’s #params implementation (see #72 in lighthouse).
- #user_agent ⇒ Object
Instance Method Details
#accept ⇒ Object
14 15 16 |
# File 'lib/sinatra/base.rb', line 14 def accept @env['HTTP_ACCEPT'].split(',').map { |a| a.strip } end |
#params ⇒ Object
Override Rack 0.9.x’s #params implementation (see #72 in lighthouse)
19 20 21 22 23 |
# File 'lib/sinatra/base.rb', line 19 def params self.GET.update(self.POST) rescue EOFError => boom self.GET end |
#user_agent ⇒ Object
10 11 12 |
# File 'lib/sinatra/base.rb', line 10 def user_agent @env['HTTP_USER_AGENT'] end |