Class: Grape::Middleware::Globals
- Defined in:
- lib/grape/middleware/globals.rb
Constant Summary
Constants inherited from Base
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
#after, #call, #call!, #content_type, #content_type_for, #content_types, #default_options, #initialize, #mime_types, #response
Methods included from DSL::Headers
Methods included from Helpers
Constructor Details
This class inherits a constructor from Grape::Middleware::Base
Instance Method Details
#before ⇒ Object
6 7 8 9 10 11 |
# File 'lib/grape/middleware/globals.rb', line 6 def before request = Grape::Request.new(@env, build_params_with: @options[:build_params_with]) @env[Grape::Env::GRAPE_REQUEST] = request @env[Grape::Env::GRAPE_REQUEST_HEADERS] = request.headers @env[Grape::Env::GRAPE_REQUEST_PARAMS] = request.params if @env[Rack::RACK_INPUT] end |