use URI#encode_www_form to encode a hash