def http_build_query(params = {})
        params.collect do |k,v|
          "#{URI.encode(k.to_s)}=#{URI.encode(v.to_s)}" unless v.nil?
        end.compact.join('&')
      end
def http_build_query(params = {})
        params.collect do |k,v|
          "#{URI.encode(k.to_s)}=#{URI.encode(v.to_s)}" unless v.nil?
        end.compact.join('&')
      end
Composes an HTTP query string from an hash of +options+.
 The result is URI encoded.

   http_build_query(:foo => 'baa', :bar => 'boo')
   # => foo=baa&bar=boo