I\'m using the Apache HttpClient 4 and it works fine. The only thing that doesn\'t work is custom ports. It seems like the root directory is fetched and the port is ignored.
One suggestion is to try using HttpPost(URI address)
instead of the one with String
parameter. You can explicitly set the port:
URI address = new URI("http", null, "my.domain.com", 50000, "/my_file", "id=10", "anchor")
HttpPost post = new HttpPost(address);
HttpResponse response = httpClient.execute(post);
Can't guarantee this will work, but give it a try.