RE: [httpclient] PostMethod.setRequestBody (was RE: HttpClient Post)

2002-04-24 Thread Waldhoff, Rodney
I just committed changes along these lines: /** * @throws IllegalStateException if request params have been added */ public void setRequestBody(String body) { if(!parameters.isEmpty()) { throw new IllegalStateException("Request parameters have already been added."); } requestBody

Re: [httpclient] PostMethod.setRequestBody (was RE: HttpClient Post)

2002-04-24 Thread Rainer Klute
"Waldhoff, Rodney" <[EMAIL PROTECTED]> wrote: > >Re: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8458 > >It's not entirely clear to me how the contract should work between >setRequestBody and setParameter. Both are trying to set the body for the >POST request, and doing so in incompatible wa

RE: [httpclient] PostMethod.setRequestBody (was RE: HttpClient Post)

2002-04-24 Thread Waldhoff, Rodney
> According to the documentation, an exception is > to be thrown if the request body is set and > addParameter is to be called. This makes no sense, > as there is no way to set the body... Not exactly. There's a protected method of PostMethod called generateRequestBody, which generates and re