I'm trying to create auto test (java). Service should be able to handle request correctly: return json instead of java stack trace.
In this test i have cases like #host/some/path/?param=%
Ok, % is incorrect symbol and should be encoded. When you are developer and creating service that send requests. But this is a test.
So question is: how can i create get response with url «as is», without encoding? Currently i'm using apache httpclient (4.5.2)
Currently i have nothing really special:
public void fetchGet(String uri) {
HttpGet getRequest = new HttpGet(uri);
HttpClient client = HttpClientBuilder.create().build();
try {
response = client.execute(requestBase);
} catch (IOException e) {
e.printStackTrace();
} finally {
requestBase.abort();
}
}