Oct 29, 2018

Example of org.apache.http.client.utils.uribuilder

URIBuilder


Maven dependency:


<dependency>
         <groupId>org.apache.httpcomponents</groupId>
          <artifactId>httpclient-osgi</artifactId>
          <version>4.3.6</version>
</dependency>

URIBuilder u=null;
 try {
   u =new URIBuilder("http://it.i88.ca/bounce");

    for (String name : map.keySet()) {
     u.addParameter(name, map.get(name));
    }
   } catch (URISyntaxException e) {
     e.printStackTrace();
   }
   System.out.println(u.toString());