Let's look at the following code example in which the path and the only parameter are encoded ...
Parameter Name: "param"
Parameter value: "foo / bar? Aaa = bbb & ccc = ddd" (this is a URL with request parameters)
String test = UriBuilder.fromPath("https://dummy.com").
queryParam("param", "foo/bar?aaa=bbb&ccc=ddd").
build().toURL().toString();
The returned string of the encoded URL:
"https://dummy.com?param=foo/bar?aaa%3Dbbb&ccc%3Dddd"
Is it correct?
Should the character "&" (and maybe even "?") Be encoded in the parameter value string?
Will the display URL be interpreted as follows:
One first parameter, name = "param", value = "ar? Aaa% 3Dbbb", followed by a second parameter name = "ccc% 3Dddd" with no value.
Fred