You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Pill, Juergen" <Ju...@softwareag.com> on 2002/12/19 11:18:21 UTC
New method in PutMethod/HttpRequestBodyMethodBase
Hello,
I want to suggest a new method within PutMethod/ HttpRequestBodyMethodBase
and possibly deprecate the method setRequestBody(String)
/**
* Set my request body content to the contents of a string with the
given encoding.
*
* @since 2.0
*/
public void setRequestBody(String bodydata, String encoding) throws
java.io.UnsupportedEncodingException {
checkNotUsed();
setRequestBody(bodydata.getBytes(encoding));
}
Best regards,
Juergen
-----Original Message-----
From: Pill, Juergen [mailto:Juergen.Pill@softwareag.com]
Sent: Thursday, December 19, 2002 11.13 AM
To: 'Commons HttpClient Project'
Subject: Seperation of PutMethod
<< File: HttpRequestBodyMethodBase.java >> << File: ATT431386.txt >> Hello,
I want to suggest the separation of the PutMethod into two classes:
1) the class PutMethod contains all the code it contains now, except the
code of the class HttpRequestBodyMethodBase.
2) PutMethod inherits from HttpRequestBodyMethodBase, to recive full
functionality.
3) HttpRequestBodyMethodBase is very similar (identical, except package
name) as the attached HttpRequestBodyMethodBase.java
This changes would make the implementation of the Slide WebDAV API layer
easier. Most WebDAV methods accept a body (delivered either as a String,
byte[], File, etc). Currently the class HttpRequestBodyMethodBase in Slide
is a clone of the relevant part of PutMethod within the commons project.
<<HttpRequestBodyMethodBase.java>>
Best regards,
Juergen