# File lib/puppet/indirector/rest.rb, line 37
37:   def deserialize(response, multiple = false)
38:     case response.code
39:     when "404"
40:       return nil
41:     when /^2/
42:       raise "No content type in http response; cannot parse" unless response['content-type']
43: 
44:       content_type = response['content-type'].gsub(/\s*;.*$/,'') # strip any appended charset
45: 
46:       body = uncompress_body(response)
47: 
48:       # Convert the response to a deserialized object.
49:       if multiple
50:         model.convert_from_multiple(content_type, body)
51:       else
52:         model.convert_from(content_type, body)
53:       end
54:     else
55:       # Raise the http error if we didn't get a 'success' of some kind.
56:       raise convert_to_http_error(response)
57:     end
58:   end