Re: preemptive

2003-06-09 Thread Adrian Sutton
Zulfi, *Please* at a minimum take a look at http://jakarta.apache.org/commons/httpclient/logging.html and include a debug log with any issue, it makes things so much easier at our end because it saves us guessing. You'll probably also want to take a look at http://jakarta.apache.org/commons/ht

Re: preemptive

2003-06-09 Thread Michael Becke
Zulfi, Please send a wire and trace log. It is difficult to resolve these sort of problems without them. Take a look at http://jakarta.apache.org/commons/httpclient/logging.html for details. Mike On Monday, June 9, 2003, at 06:44 PM, Zulfi Umrani wrote: Tried to use the Preemptive Authentic

preemptive

2003-06-09 Thread Zulfi Umrani
Tried to use the Preemptive Authentication feature. Could not get it to work. I used the HttpState.setAuthenticationPreemptive(true); to set the preemptive authentication ON. It still send the first request without the Authorization header. Code sample is below. Would like to know, how to set up th

Re: HttpURLconnection, POST & Authentication

2003-06-09 Thread Michael Becke
On Monday, June 9, 2003, at 06:21 PM, Zulfi Umrani wrote: So what you are saying is that I can use HttpClient APIs and execute the method and then wrap that method in HttpURLConnection so that I am using java.net APIs to get the response? In other words I can not use it like java.net API for mak

Re: URI specification

2003-06-09 Thread Michael Becke
I definitely agree that it would be best if URI had its own home outside of HttpClient. My impression was that we would try to have it removed by 2.1 but I see that it is not deprecated. Perhaps that is due to the luke warm reception it has received from the commons community at large. I agr

Re: HttpURLconnection, POST & Authentication

2003-06-09 Thread Zulfi Umrani
So what you are saying is that I can use HttpClient APIs and execute the method and then wrap that method in HttpURLConnection so that I am using java.net APIs to get the response? In other words I can not use it like java.net API for making requests. Is that correct? If NOT, how can I use this cla

Re: HttpURLconnection, POST & Authentication

2003-06-09 Thread Michael Becke
Yes, this class unfortunately serves little purpose. As specified in the JavaDocs it only acts as a wrapper for an already executed HttpMethod. It really only provides access for querying an HttpClient response with the java.net API. Mike On Monday, June 9, 2003, at 06:00 PM, Zulfi Umrani wr

Re: Following code throws IllegalArgumentException: host parameter is null! Does any one know why?

2003-06-09 Thread Michael Becke
As Adrian said it is difficult to say without some detail. One thing I can say is that you do not use UrlPostMethod. This class is deprecated. PostMethod provides the same functionality. Mike On Monday, June 9, 2003, at 05:24 PM, Zulfi Umrani wrote: Following code throws IllegalArgumentExce

Re: HttpURLconnection, POST & Authentication

2003-06-09 Thread Zulfi Umrani
Thanks for the info. I believe you have a HttpURLConnection class which is a wrapper on java.net.HttpURLConnection. Wouldn't that work to do POST+Authentication? >>> [EMAIL PROTECTED] 6/9/2003 8:51:06 PM >>> Hello again, HttpClient works differently to HttpURLConnection because despite initial im

Re: Following code throws IllegalArgumentException: hostparameter is null! Does any one know why?

2003-06-09 Thread Zulfi Umrani
This problem got solved when I pass the HostConfiguration object in the "executeMethod" method. Looks like it's redundant, but did get rid of the exception! >>> [EMAIL PROTECTED] 6/9/2003 8:46:03 PM >>> On Tuesday, June 10, 2003, at 07:24 AM, Zulfi Umrani wrote: > Following code throws IllegalA

Re: HttpURLconnection, POST & Authentication

2003-06-09 Thread Adrian Sutton
Hello again, HttpClient works differently to HttpURLConnection because despite initial impressions they do different things. If you want the ability to change between Http libraries, you need to provide an abstraction layer in the form of a single class that handles all the HTTP stuff for your

Re: Following code throws IllegalArgumentException: host parameter is null! Does any one know why?

2003-06-09 Thread Adrian Sutton
On Tuesday, June 10, 2003, at 07:24 AM, Zulfi Umrani wrote: Following code throws IllegalArgumentException: host parameter is null! Does any one know why? Because the host parameter is null... somewhere, somehow. When reporting an exception with any Java product, please include the full stack

HttpURLconnection, POST & Authentication

2003-06-09 Thread Zulfi Umrani
I am trying to do POST using HttpURLConnection. Also I would like to do Basic/Digest/NTLM Authentication at the same time. Since most of my earlier code is done using java.net.HttpURLConnection, I would like to maintain the APIs such as getOutputStream(), getInputStream() and get/setHeader(). Does

Following code throws IllegalArgumentException: host parameteris null! Does any one know why?

2003-06-09 Thread Zulfi Umrani
Following code throws IllegalArgumentException: host parameter is null! Does any one know why? HttpClient hc = new HttpClient(); HttpState state = hc.getState(); state.setCredentials("", new UsernamePasswordCredentials("zulfi", "zulfi")); String urlstr = "http://localhost:

Fwd: URI specification

2003-06-09 Thread Oleg Kalnichevski
Folks, It looks like this directly applies to us (see below). It also raises a question of how we go about URI support in the future. Since Sung-Gu has pretty much retired from the project (he's been a no-show on this list for several months already), URI stuff is ripe for a take over. Spinning i