Hello neel,

in this case, you need to update the request's entity 
(request#setEntity()) with a new Representation.
One solution is to instantiate a StringRepresentation with the text of 
the current representation. In this case, you lost all of its attributes.
Another solution is to wrap the current representation with a subclass 
of the WrapperRepresentation class. You will have to override the 
getText(), and getStream() methods - I guess - in order to keep the 
content persistent.

Best regards,
Thierry Boileau


> thank you!
>  
> In my develpmemt, i hava already use the Representation#getText() in 
> the business code . But now in debugging, i want print the entity 
> content for debugging information before it go into the business code 
> . So I need ready the entity content without change the business code. 
> It only used in the debugging stage. is there a simple way to sovle my 
> problem?
>  
>  
>  
> 2009-11-17
> ------------------------------------------------------------------------
> guozhen07
> ------------------------------------------------------------------------
> *·¢¼þÈË£º* [email protected]
> *·¢ËÍʱ¼ä£º* 2009-11-17  08:49:54
> *ÊÕ¼þÈË£º* [email protected]
> *³­ËÍ£º*
> *Ö÷Ì⣺* RE: Re: POST not working
> Thanks again, and my problem is solved.  It turns out that there was a typo 
> in the HTML form I was using to generate the POST request.  So the request 
> fell all the way through the router to my DefaultResource... and POST is not 
> allowed by that resource.  So the response I was getting was trying to tell 
> me, correctly, that POST is not allowed by DefaultResource.  Unfortunately, I 
> interpreted it as saying that POST is not allowed by DiscoveryResource 
> instead.  So I was chasing the wrong problem.
>  
> And now... back to productive development!
> Regards,
> Eric
>  
> ------------------------------------------------------
> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2418725
>  
> <http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2418725>
>

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2418897

Reply via email to