Thanks Jerome,  prompt as always :)

Jerome Louvel wrote:
Hi Jonathan,

Good point. Instead of exposing the internal "entityAdded" member variable,
I have overloaded the HttpRequest.setEntity() method to set "entityAdded" to
true.

Checked in SVN trunk and branches/1.0.

Best regards,
Jerome
-----Message d'origine-----
De : Jonathan Hall [mailto:[EMAIL PROTECTED] Envoyé : lundi 7 mai 2007 08:41
À : discuss@restlet.tigris.org
Objet : HttpRequest not retreiving a custom entity

Hi,

I have a usecase where I want to replace the entity in a request. However this does not work due to the following:

 com.noelios.restlet.http.HttpRequest

    public Representation getEntity() {
        if (!this.entityAdded) {
setEntity(((HttpServerCall) getHttpCall()).getRequestEntity());
            this.entityAdded = true;
        }

        return super.getEntity();
    }

Is it possible to modify the code or allow an accessor for entityAdded.

Cheers,

Jonathan Hall


Reply via email to