Class: Cortex::FaradayMiddleware::NormalizeURIPath

Inherits:
Faraday::Middleware
  • Object
show all
Defined in:
lib/cortex/faraday_middleware/normalize_uri_path.rb

Instance Method Summary collapse

Instance Method Details

#call(env) ⇒ Object



7
8
9
10
11
# File 'lib/cortex/faraday_middleware/normalize_uri_path.rb', line 7

def call(env)
  env[:url].path = Addressable::URI.normalize_component(env[:url].path)

  @app.call env
end