How to construct a URI
like www.google.com/p1/p2?what&k1=v1&k2=v2
using URIBuilder
?
When I use Java's URIBuilder.setParameter(), I must pass in an name and a value.
How can I construct the above uri without using URIBuilder.setCustomQuery() ?
UriBuilder builder = new UriBuilder()
.setScheme("https")
.setHost("www.google.com")
.setPath("/p1/p2")
.addParameter("what",null)
.addParameter("k1", "v1")
.addParameter("k2", "v2")
builder.toString();