hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pill, Juergen" <Juergen.P...@softwareag.com>
Subject New method in PutMethod/HttpRequestBodyMethodBase
Date Thu, 19 Dec 2002 10:18:21 GMT
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



Mime
View raw message