Class: Upfluence::HTTP::Middleware::RequestStapler

Inherits:
Object
  • Object
show all
Defined in:
lib/upfluence/http/middleware/request_stapler.rb

Instance Method Summary collapse

Constructor Details

#initialize(app) ⇒ RequestStapler

Returns a new instance of RequestStapler.



5
6
7
# File 'lib/upfluence/http/middleware/request_stapler.rb', line 5

def initialize(app)
  @app = app
end

Instance Method Details

#call(env) ⇒ Object



9
10
11
12
# File 'lib/upfluence/http/middleware/request_stapler.rb', line 9

def call(env)
  Server.request = Rack::Request.new(env)
  @app.call(env)
end