hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <o.kalnichev...@dplanet.ch>
Subject Re: [PATCH] PostMethod & PutMethod revision (take 1)
Date Wed, 29 Jan 2003 19:31:01 GMT
You know what? I have long been thinking the same. Actually, in my
private Java 1.1 HttpClient fork I have had a class called RawPostMethod
similar to StreamPostMethod of yours. I just felt it would be too much
of a change to be acceptable. You, guys, ran over me last time I
suggested to remove an absolutely superfluous disk buffering in
GetMethod class ;-)

Anyhow, let's consult our friendly wizard and the rest of the folks

Clearly +1 from me

Cheers

Oleg



On Wed, 2003-01-29 at 20:12, Michael Becke wrote:
> Yes, that's what I was thinking.
> 
> I have a suggestion about how to simplify things some.  It seems that 
> there should be two PostMethods.  One that takes parameters and one that 
> takes an InputStream.  Something like:
> 
> ParameterPostMethod extends EntityEnclosingMethod {
> 
>      // returns the buffered params
>      InputStream getRequestBody()
>      void addParameter(NameValuePair param)
>      NameValuePair getParameter(String paramName)
>      void setParameter(String parameterName, String parameterValue)
> }
> 
> StreamPostMethod extends EntityEnclosingMethod {
> 
>      // returns the stream, can only be done once
>      InputStream getRequestBody()
>      void setRequestBody(String body)
>      void setRequestBody(InputStream body)
> 
>      // optional, uses chunked if not set
>      void setRequestContentLength(int length)
> 
> }
> 
> EntityEnclosingMethod {
> 
>      abstract int getRequestContentLength()
>      abstract InputStream getRequestBody()
> 
> }
> 



Mime
View raw message