title: Issue to escape curly brace in the url of an Unirest.get
body: <p>I'm trying to retrieve the result of this rest endpoint:</p>
  
  <p><a href="http://sampleserver6.arcgisonline.com/arcgis/rest/services/Utilities/Geometry/GeometryServer/distance?sr=4326&amp;geometry1=%7B%22geometryType%22:%22esriGeometryPoint%22,%22geometry%22:%7B%22x%22:43.5664375,%22y%22:1.4675999%7D%7D&amp;geometry2=%7B%22geometryType%22:%22esriGeometryPoint%22,%22geometry%22:%7B%22x%22:49.120329,%22y%22:6.164786%7D%7D&amp;geodesic=true&amp;f=pjson" rel="nofollow noreferrer">http://sampleserver6.arcgisonline.com/arcgis/rest/services/Utilities/Geometry/GeometryServer/distance?sr=4326&amp;geometry1={"geometryType":"esriGeometryPoint","geometry":{"x":43.5664375,"y":1.4675999}}&amp;geometry2={"geometryType":"esriGeometryPoint","geometry":{"x":49.120329,"y":6.164786}}&amp;geodesic=true&amp;f=pjson</a></p>
  
  <p>Here is how I am doing:   </p>
  
  <pre><code> String geometry1 = "geometry1={\"geometryType\":\"esriGeometryPoint\",\"geometry\":{\"x\":43.5664375,\"y\":1.4675999}}";
   String geometry2 = "geometry2={\"geometryType\":\"esriGeometryPoint\",\"geometry\":{\"x\":49.120329,\"y\":6.164786}}";
  
   try {
          response5 = Unirest.get("http://sampleserver6.arcgisonline.com/arcgis/rest/services/Utilities/Geometry/GeometryServer/distance?sr=4326&amp;{geometry1}&amp;{geometry2}&amp;geodesic=true&amp;f=pjson")
                  .routeParam("geometry1", geometry1)
                  .routeParam("geometry2", geometry2)
                  .asJson();
      } catch (UnirestException e) {
          e.printStackTrace();
      }
  </code></pre>
  
  <p>But I get this error where the illegal character is the first curly brace of my url: <code>geomtry1={</code></p>
  
  <pre><code>Exception in thread "main" java.lang.IllegalArgumentException: Illegal character in query at index 122
  </code></pre>
  
  <p>How can I escape the curly braces ? I tried <code>URLEncoder.encode</code>. That escape the curcly braces but that seem to doesn't format the url correctly because i get the error : <code>geometry1' must be specified","'geometry2' must be specified</code>. </p>