Trying to build http://IP:4567/foldername/1234?abc=xyz
. I don\'t know much about it but I wrote below code from searching from google:
import java.n
You can just pass raw spec
new URL("http://IP:4567/foldername/1234?abc=xyz");
Or you can take something like org.apache.http.client.utils.URIBuilder and build it in safe manner with proper url encoding
URIBuilder builder = new URIBuilder();
builder.setScheme("http");
builder.setHost("IP");
builder.setPath("/foldername/1234");
builder.addParameter("abc", "xyz");
URL url = builder.build().toURL();