400 error with HttpClient for a link with an anchor
Here is my code: DefaultHttpClient client = new DefaultHttpClient(); HttpGet request = new HttpGet(url); HttpResponse response = client.execute(request); This works for every url I have tried so far, except for some urls that contain an anchor. Some of these anchored urls return a 400. The weird thing is that it isn't all links that contain an anchor, a lot of them work just fine. Unfortunately, I have to be really general as I can't provide the specific urls here. The links are completely valid and work just fine in any browser, but the HttpClient returns a 400 when trying the link. If I