I'm trying to figure out which URL I was directed to. I'm using the following code and it seems to hide the redirect.
HttpPost httpPost = new HttpPost(url);
DefaultHttpClient httpclient = new DefaultH开发者_开发问答ttpClient();
HttpResponse response = httpclient.execute(httpPost);
Thanks, Erik
HttpClient automatically follows redirects. The only way I know of to know what redirects are going on is to introduce a RedirectHandler, as is discussed in a previous SO entry: Preventing HttpClient 4 from following redirect.
精彩评论