I am trying to create http parameters from a hash, I have Ruby on Rails, I tried to use it URI.encode_www_form(params), but this does not generate parameters correctly.
Below is the hash that I have
params['Name'.to_sym] = 'Nia Kun'
params['AddressLine1'.to_sym] = 'Address One'
params['City'.to_sym] = 'City Name'
This method converts space to +, what I want is convert space with %20
I get "Name=Nia+Kun&AddressLine1=Address+One&City=City+Name", but I need these spaces to be converted to% 20
source
share