Class: Grape::Request

Inherits:
Rack::Request
  • Object
show all
Defined in:
lib/grape/request.rb

Constant Summary collapse

HTTP_PREFIX =
'HTTP_'

Instance Method Summary collapse

Constructor Details

#initialize(env, options = {}) ⇒ Request

Returns a new instance of Request.



9
10
11
12
# File 'lib/grape/request.rb', line 9

def initialize(env, options = {})
  extend options[:build_params_with] || Grape.config.param_builder
  super(env)
end

Instance Method Details

#headersObject



18
19
20
# File 'lib/grape/request.rb', line 18

def headers
  @headers ||= build_headers
end

#paramsObject



14
15
16
# File 'lib/grape/request.rb', line 14

def params
  @params ||= build_params
end

#rack_paramsObject



7
# File 'lib/grape/request.rb', line 7

alias rack_params params