我正在使用http客户端URIBuilder来构建url。以下是我的代码。但只要它在查询参数中有日期,就会给我一个问题,因为它会对日期进行两次编码
HashMap<String, String> queryParamater = (HashMap<String, String>)object; //this is hashmap of query params
try {
URIBuilder urlBuilder = new URIBuilder(urlStr); //urlStr is base url
for (String key: queryParamater.keySet()) {
urlBuilder.addParameter(key, queryParamater.get(key));
}
URL url = urlBuilder.build().toURL();
有没有办法停止两次编码网址。或任何其他网址建设者?