process_result (RestClient::Request)

    # File lib/restclient/request.rb, line 172
                    def process_result(res)
                            if res.code =~ /\A2\d{2}\z/
                                    # We don't decode raw requests
                                    unless @raw_response
                                            self.class.decode res['content-encoding'], res.body if res.body
                                    end
                            elsif %w(301 302 303).include? res.code
                                    url = res.header['Location']

                                    if url !~ /^http/
                                            uri = URI.parse(@url)
                                            uri.path = "/#{url}".squeeze('/')
                                            url = uri.to_s
                                    end

                                    raise Redirect, url
                            elsif res.code == "304"
                                    raise NotModified, res
                            elsif res.code == "401"
                                    raise Unauthorized, res
                            elsif res.code == "404"
                                    raise ResourceNotFound, res
                            else
                                    raise RequestFailed, res
                            end
                    end