Class: RestClient::Request::NoExceptions

Inherits:
RestClient::Request
  • Object
show all
Defined in:
lib/kernul/request.rb

Instance Method Summary collapse

Instance Method Details

#process_result(res) ⇒ Object

Returns the results of the request in the form of a Rack array.



8
9
10
11
12
13
# File 'lib/kernul/request.rb', line 8

def process_result(res)
  result_headers = res.header.to_hash
  result_headers.each { |key, value| result_headers[key] = value[0]}

  [res.code, result_headers, decode(res['content-encoding'], res.body)]
end