Method: Etcd::Client#build_http_request
- Defined in:
- lib/etcd/client.rb
#build_http_request(klass, path, params = nil, body = nil) ⇒ Object
rubocop:enable MethodLength
157 158 159 160 161 162 163 |
# File 'lib/etcd/client.rb', line 157 def build_http_request(klass, path, params = nil, body = nil) path += '?' + URI.encode_www_form(params) unless params.nil? req = klass.new(path) req.body = URI.encode_www_form(body) unless body.nil? Etcd::Log.debug("Built #{klass} path:'#{path}' body:'#{req.body}'") req end |