Class: Sinatra::Request

Class | Sinatra::Request
In: | lib/sinatra/base.rb
Parent: | Rack::Request

The request object. See Rack::Request for more info: rack.rubyforge.org/doc/classes/Rack/Request.html

### Methods

accept params user_agent

### Public Instance methods

accept()

Returns an array of acceptable media types for the response

[Source]

        # File lib/sinatra/base.rb, line 19
    19:     def accept
    20:       @env['HTTP_ACCEPT'].to_s.split(',').map { |a| a.strip }
    21:     end

params()

Override Rack 0.9.x‘s params implementation (see 72 in lighthouse)

[Source]

        # File lib/sinatra/base.rb, line 24
    24:     def params
    25:       self.GET.update(self.POST)
    26:     rescue EOFError, Errno::ESPIPE
    27:       self.GET
    28:     end

user_agent()

[Source]

        # File lib/sinatra/base.rb, line 14
    14:     def user_agent
    15:       @env['HTTP_USER_AGENT']
    16:     end

[Validate]