class Geocoder::Lookup::Base

def fetch_raw_data(query, reverse = false)


Fetches a raw search result (JSON string).
#
def fetch_raw_data(query, reverse = false)
  timeout(Geocoder::Configuration.timeout) do
    url = query_url(query, reverse)
    uri = URI.parse(url)
    unless cache and body = cache[url]
      client = http_client.new(uri.host, uri.port)
      client.use_ssl = true if Geocoder::Configuration.use_https
      response = client.get(uri.request_uri)
      body = response.body
      if cache and (200..399).include?(response.code.to_i)
        cache[url] = body
      end
    end
    body
  end
end