query (XRI::ProxyResolver)

    # File lib/yadis/xrires.rb, line 42
        def query(xri, service_types)
          # these can be query args or http headers, needn't be both.
          # headers = {'Accept' => 'application/xrds+xml;sep=true'}
          fetcher = NetHTTPFetcher.new
          services = service_types.collect { |service_type|
            url = self.query_url(xri, service_type)
            response = fetcher.get(url)
            raise XRIHTTPError, "Could not fetch #{xri}" if response.nil?
            xrds = XRDS.new(response[1].body)
            return xrds.services unless xrds.nil?
          }
          # TODO:
          #  * If we do get hits for multiple service_types, we're almost
          #    certainly going to have duplicated service entries and
          #    broken priority ordering.
          services = services.inject([]) { |flatter, some_services|
            flatter.concat(some_services) unless some_services.nil?
          }
        end