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

Constructor Details

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

Instance Method Details

#request_call(datum) ⇒ Object



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

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