hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vboss...@scdi.org
Subject utility class to create URL strings
Date Sat, 21 Jun 2008 08:01:40 GMT
All,

I feel kind of stupid to ask such a simple question but I couldn't  
find the right library to do this simple job (and even asking around  
didn't return much valuable information).

I would like to provide a handy way to (only) create a string URL  
definition, manage the parameters and handle the encoding.  Something  
like:

   URLDefinition def = new URLDefinition("http://google.com");
   def.addParameter("lang", "de");
   def.addParameter("country", "ch");
   String a = def.toString();

and a is magically "http://google.com?lang=de&country=ch" :-)

I haven't seen anything ready-to-use in the various commons libraries  
(HttpParams is the closest I could find).  Is there anything out there  
that I've been missing or should I simply roll my own version?

Best regards,

-Vladimir



---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Mime
View raw message