title: How to transform white spaces into plus (+) characters for an http url?
body: <p>I am about to do a similar curl call like this:</p>
  
  <pre><code>curl https://api.mapbox.com/geocoding/v5/mapbox.places/1600+pennsylvania+ave+nw.json
  </code></pre>
  
  <p>When I enter my own address, it looks like this: <code>1600 pennsylvania ave nw</code>. I tried to convert the white spaces to the <code>+</code> characters with using the <code>URI.encode</code> method:</p>
  
  <pre><code>address = URI.encode(full_address)
  </code></pre>
  
  <p>But the result is <code>1600%20pennsylvania%20ave%20nw</code>, which, after all, seems to be a correct output, however it doesn't solve my problem.</p>
  
  <p>As a possible solution is to manually convert and replace every character, but is there a better solution?</p>