You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by Rob Tanner <rt...@linfield.edu> on 2011/06/24 23:15:34 UTC

I've got a problem passing on a redirect and could use some help

Hi,

I have a new project that entails first authenticating a client then gathering other data about the client and passing that off to a server belonging to a vendor.  The response may include a body or it may just be a redirect and I need to be able to pass that response back intact to a client browser.  From the httpclient tutorial I copied the following:

            HttpClient httpclient = new DefaultHttpClient();
            HttpGet httpget = new HttpGet("http://<vendorURL>);
            HttpResponse resp = httpclient.execute(httpget);
            HttpEntity entity = resp.getEntity();


The response to the client, of course, is a standard HttpServletResponse but I don’t know how to connect them.

Any help would be terrific.


Thanks,

Rob Tanner
Linfield College