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.


11
12
13
14
# File 'lib/grape/request.rb', line 11

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

Instance Method Details

#headersObject


20
21
22
# File 'lib/grape/request.rb', line 20

def headers
  @headers ||= build_headers
end

#paramsObject


16
17
18
# File 'lib/grape/request.rb', line 16

def params
  @params ||= build_params
end

#rack_paramsObject


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

alias rack_params params