Method: Elasticsearch::Transport::Transport::Connections::Connection#full_url
- Defined in:
- lib/elasticsearch/transport/transport/connections/connection.rb
#full_url(path, params = {}) ⇒ String
Returns the complete endpoint URL with host, port, path and serialized parameters.
58 59 60 61 62 63 64 65 66 |
# File 'lib/elasticsearch/transport/transport/connections/connection.rb', line 58 def full_url(path, params = {}) url = "#{host[:protocol]}://" url += "#{CGI.escape(host[:user])}:#{CGI.escape(host[:password])}@" if host[:user] url += "#{host[:host]}:#{host[:port]}" url += "#{host[:path]}" if host[:path] full_path = full_path(path, params) url += '/' unless full_path.match?(/^\//) url += full_path end |