i am trying to access a website using https and get request using apache http client the problem i am facing is that when i try to access my desired url from code it gives the following exception
Caused by: java.net.URISyntaxException: Illegal character in query at index: <some url>
but when i check it, the exception URL is not same as mine, may be it is trying to redirect it
i can more explain my scenario in the following way:
HttpGet get0 = new HttpGet(myurl);
CloseableHttpResponse httpResponse_g0 = httpclient.execute(get0);
then exception comes and states:
Caused by: java.net.URISyntaxException: Illegal character in query at index: <some other url>
can someone explain how this is happening and how can i control it?