Method: Etcd::Client#process_http_request

Defined in:
lib/etcd/client.rb

#process_http_request(res) ⇒ Object

need to have original request to process the response when it redirects



135
136
137
138
139
140
141
142
143
144
145
146
147
# File 'lib/etcd/client.rb', line 135

def process_http_request(res)
  case res
  when HTTP_SUCCESS
    Log.debug('Http success')
    res
  when HTTP_CLIENT_ERROR
    fail Error.from_http_response(res)
  else
    Log.debug('Http error')
    Log.debug(res.body)
    res.error!
  end
end