Module: Upkey::Helios::Responder

Defined in:
lib/upkey/helios/responder.rb

Class Method Summary collapse

Class Method Details

.parse(response) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
# File 'lib/upkey/helios/responder.rb', line 4

def self.parse(response)
  case response.status
  when 404, 401, 200, 204
    Upkey::Helios::Response.new({
      status: response.status,
      contents: response.body,
      headers: response.headers
    })
  else
    raise HeliosResponseError
  end
end