def encode_params(uri, params)
      params_str = String.new('?')
      params.each do |k, v|
        params_str << "#{k}=#{CGI.escape(v.to_s)}&" if v
      end
      params_str.chop!
      uri + params_str
    end
def encode_params(uri, params)
      params_str = String.new('?')
      params.each do |k, v|
        params_str << "#{k}=#{CGI.escape(v.to_s)}&" if v
      end
      params_str.chop!
      uri + params_str
    end
A very simple param encoder