Mike
Oleg Kalnichevski wrote:
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()
}
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]