Results 1 to 1 of 1
- 08-19-2011, 09:25 AM #1
Member
- Join Date
- Aug 2011
- Posts
- 6
- Rep Power
- 0
Setting credentials to HTTPClient
I am using httpclient api and i want to make request using httpclient .how we will set login details using httpclient
below is the sample code
HttpClient client = null;
// System.getProperties().setProperty("httpclient.use ragent",
//"Mozilla/4.0");
client = new HttpClient(new MultiThreadedHttpConnectionManager());
//url = MiscHelper.toAbsoluteUrl(this.baseUrl, url);
GetMethod get = new GetMethod(url);
get.setRequestHeader("User-Agent","Mozilla/4.0 (compatible; MSIE 8.0; Windows 2000)");
Similar Threads
-
Need help in redirecting to a site directly surpassing credentials.
By umapathy_sekar in forum Advanced JavaReplies: 0Last Post: 09-24-2010, 06:11 AM -
Send login credentials to applet in html
By spooky in forum Java AppletsReplies: 2Last Post: 05-14-2010, 03:50 AM -
Using HttpClient
By jdetloff in forum New To JavaReplies: 4Last Post: 01-06-2010, 10:43 AM -
Using HttpClient with Eclipse
By jdetloff in forum EclipseReplies: 4Last Post: 01-06-2010, 09:47 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks