Class: Response::RaiseInvalidCookie

Inherits:
Middleware
  • Object
show all
Defined in:
lib/faraday/raise_invalid_cookie.rb

Class Method Summary collapse

Class Method Details

.register_on_complete(env) ⇒ Object



5
6
7
8
9
10
11
# File 'lib/faraday/raise_invalid_cookie.rb', line 5

def self.register_on_complete(env)
  env[:response].on_complete do |response|
    if response[:response_headers]['set-cookie']
      raise BullionVault::InvalidCookie, error_message(response)
    end
  end
end