Class: Request::CookieAuth
- Inherits:
-
Faraday::Middleware
- Object
- Faraday::Middleware
- Request::CookieAuth
- Defined in:
- lib/faraday/cookie_auth.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, cookie) ⇒ CookieAuth
constructor
A new instance of CookieAuth.
Constructor Details
#initialize(app, cookie) ⇒ CookieAuth
Returns a new instance of CookieAuth.
10 11 12 |
# File 'lib/faraday/cookie_auth.rb', line 10 def initialize(app, ) @app, @cookie = app, end |
Instance Method Details
#call(env) ⇒ Object
5 6 7 8 |
# File 'lib/faraday/cookie_auth.rb', line 5 def call(env) env[:request_headers]['Cookie'] = @cookie @app.call(env) end |