Java tutorial
//package com.java2s; import java.util.List; import org.apache.http.NameValuePair; import org.apache.http.client.utils.URLEncodedUtils; public class Main { private static String buildGetUrl(List<NameValuePair> params, String url) { String paramString = URLEncodedUtils.format(params, "utf-8"); if (!url.endsWith("?")) url += "?"; url += paramString; return url; } }