hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Phani Sajja <sajja.ph...@gmail.com>
Subject Problem in passing parameters in HttpPost and HttpGet
Date Tue, 28 Apr 2009 05:58:57 GMT
Hi All,
         I need to bypass internal proxy firewall to connect to the
internet. I have no problem connecting to the internet with the following

        DefaultHttpClient httpclient = new DefaultHttpClient();
                new AuthScope("", 3128), new
UsernamePasswordCredentials("user", "pass"));
        HttpHost targetHost = new HttpHost("www.somesite.org");
        HttpHost proxy = new HttpHost("", 3128);
        HttpGet httpget = new HttpGet("/");

        HttpResponse response = httpclient.execute(targetHost, httpget);
        HttpEntity entity = response.getEntity();

Status code: *Http/1.0 200 OK*. It seems it is connecting to the target

another URI on the same site takes a parameter query and has both the get
and post implementations
I need to execute the uri above. I need to pass the query both in get and
post methods. How do I set the parameters to pass this query parameter.
Please help me.
Phani. S
M.Tech(Software Engineering)
Motilal Nehru National Institute of Technology
(+91) 9010093398

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message