Is there a good url builder for java?
addParameter() ?
willCode4Beer
2009-10-14 21:43:21
-1 : never advice anybody to use the URL class (use URI instead). Reason : http://javaantipatterns.wordpress.com/2007/11/24/comparing-urls-with-urlequals/
chburd
2010-02-26 14:47:17
+8
A:
Using HTTPClient worked well.
protected static String createUrl(List<NameValuePair> pairs) throws URIException{
HttpMethod method = new GetMethod("http://example.org");
method.setQueryString(pairs.toArray(new NameValuePair[]{}));
return method.getURI().getEscapedURI();
}
jon077
2009-05-19 20:16:12
Then you should upvote and mark as accepted the answer by takete.dk: http://bit.ly/P3AbL
OscarRyz
2009-05-19 20:21:39
A:
Bug (RFE) 6306820 in the java bug database adresses this.
In one of the comments, a link to the RFE implementation is provided.
Chantal
2010-02-26 14:08:31