title: URIBuilder and list query params
body: <p>I'm using apache <strong><a href="https://hc.apache.org/httpcomponents-client-ga/httpclient/apidocs/org/apache/http/client/utils/URIBuilder.html" rel="noreferrer">URIBuilder</a></strong> to build a query string for a <strong>GET method</strong> of a Rest service.</p>
  
  <pre><code>@RequestMapping(value="/remote") 
      public Return getTest(Ordine ordine) throws Exception{
          ...
      }
  </code></pre>
  
  <p>This is the input object:</p>
  
  <pre><code>public class Ordine{    
      private List&lt;String&gt; codici;
      //..get...set..
  }
  </code></pre>
  
  <p>I cannot understand how to set this string list as query params.</p>
  
  <p>I tried to set param twice:</p>
  
  <pre><code>URIBuilder builder = new URIBuilder()
                  .setHost("localhost")
                  .setPort(8080)
                  .setScheme("http")
                  .setPath("/remote")
                  .setParameter("codici", codicilist.get(0))
                  .setParameter("codici", codicilist.get(1));
  </code></pre>
  
  <p>But the first param it will be overwrite from the second.
  Then I tried to append [] in the param name:</p>
  
  <pre><code>URIBuilder builder = new URIBuilder()
                  .setHost("localhost")
                  .setPort(8080)
                  .setScheme("http")
                  .setPath("/remote")
                  .setParameter("codici[]", codicilist.get(0))
                  .setParameter("codici[]", codicilist.get(1));
  </code></pre>
  
  <p>But it is simply sent with name "codici[]" and the first param is overwritten.
  Then I tried a comma separated values:</p>
  
  <pre><code>URIBuilder builder = new URIBuilder()
                  .setHost("localhost")
                  .setPort(8080)
                  .setScheme("http")
                  .setPath("/remote")
                  .setParameter("codici", String.join(",",codicilist));
  </code></pre>
  
  <p>But if fails... how can I set a list of param?</p>