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 "jmlynn@rogers.com" <jm...@rogers.com> on 2004/12/18 21:08:15 UTC

import org.apache.commons.httpclient.methods.InputStreamRequestEntity unresolved

I just downloaded HttpClient V2.02 yesterday, and tried with the Get 
Method and it worked beautifully.  However, when I moved on to  the 
PostXML.java.  Sadly, I could not compile the sample code as my IDE 
complained about the InputStreamRequestEntity being unresolved.  I 
opened the Commons-Httpclient-2.02.jar, and there is no such class as 
InputStreamRequestEntity?

What am I missing?  Here is a portion of the PostXML sample code:


import org.apache.commons.httpclient.methods.InputStreamRequestEntity;

  post.setRequestEntity(new InputStreamRequestEntity(
                new FileInputStream(input), input.length()));

Any help is appreciated!

jml

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org


Re: import org.apache.commons.httpclient.methods.InputStreamRequestEntity unresolved

Posted by Oleg Kalnichevski <ol...@apache.org>.
jml,

InputStreamRequestEntity is a part of new 3.0 API. You can find 2.0.x
compatible version of PostXML.java here

http://cvs.apache.org/viewcvs.cgi/jakarta-
commons/httpclient/src/examples/PostXML.java?
rev=1.10.2.1&only_with_tag=HTTPCLIENT_2_0_BRANCH&view=markup

Oleg

On Sat, 2004-12-18 at 15:08 -0500, jmlynn@rogers.com wrote:
> I just downloaded HttpClient V2.02 yesterday, and tried with the Get 
> Method and it worked beautifully.  However, when I moved on to  the 
> PostXML.java.  Sadly, I could not compile the sample code as my IDE 
> complained about the InputStreamRequestEntity being unresolved.  I 
> opened the Commons-Httpclient-2.02.jar, and there is no such class as 
> InputStreamRequestEntity?
> 
> What am I missing?  Here is a portion of the PostXML sample code:
> 
> 
> import org.apache.commons.httpclient.methods.InputStreamRequestEntity;
> 
>   post.setRequestEntity(new InputStreamRequestEntity(
>                 new FileInputStream(input), input.length()));
> 
> Any help is appreciated!
> 
> jml
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: httpclient-user-help@jakarta.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org


Re: import org.apache.commons.httpclient.methods.InputStreamRequestEntity unresolved

Posted by "jmlynn@rogers.com" <jm...@rogers.com>.
Got it.  Thanks.

jml

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org