Class: Excon::Middleware::EscapePath

Inherits:
Base
  • Object
show all
Defined in:
lib/excon/middlewares/escape_path.rb

Instance Method Summary collapse

Methods inherited from Base

#error_call, #initialize, #response_call, valid_parameter_keys

Constructor Details

This class inherits a constructor from Excon::Middleware::Base

Instance Method Details

#request_call(datum) ⇒ Object



5
6
7
8
9
# File 'lib/excon/middlewares/escape_path.rb', line 5

def request_call(datum)
  # make sure path is encoded, prevent double encoding
  datum[:path] = Excon::Utils.escape_uri(Excon::Utils.unescape_uri(datum[:path]))
  @stack.request_call(datum)
end