Class: PDC::Request::AppendSlashToPath
- Inherits:
-
Faraday::Middleware
- Object
- Faraday::Middleware
- PDC::Request::AppendSlashToPath
- Includes:
- Logging
- Defined in:
- lib/pdc/http/request/append_slash.rb
Instance Method Summary collapse
Methods included from Logging
Instance Method Details
#call(env) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/pdc/http/request/append_slash.rb', line 7 def call(env) logger.debug "\n..... append slash .........................................." logger.debug self.class logger.debug env.url path = env.url.path env.url.path = path + '/' unless path.ends_with?('/') logger.debug "... after adding / #{env.url.path}: #{env.url}" @app.call(env) end |