Hi nameless,

You are right, there is a lack for POST, DELETE and PUT.
IMO for DELETE it is meaningless (from view of HTTP / REST) to send an 
extension, because you don't want to delete one Representation (the 
json, xml, ... one), but the full resource. For PUT and POST it could 
mean the data you send or the data you get. Especially for PUT I think, 
the extension should specify the data you send, because that is PUT.

You could also try to use the tunneling via URl parameter. Maybe that 
works better for you.

I have no experience with Restlet in combination with Spring, also not 
with Restlet-JAX-RS and Spring.

best regards
    Stephan

> Thanks a lot for your help. It took me a while to figure it out how I can use 
> the tunneling and the extension this way I want to. It is working for the GET 
> requests as expected. But I got some other questions/ issues.
>
> I just enabled the tunnel for my JaxRsApplication class and added the mime 
> types to the resource methodes within the @Produces annotation. But now I 
> discovered that it is not possible to do a POST request using the mime type 
> extension (json, xml...) I guess this is because POST is not intentend to 
> send data back to the client only http status codes. So I commented out the 
> @Produces for the POST and it was working.
>
> The problem is that the jax-rs application will be included in a spring 
> project that only allows requests with certain extensions like json, xml... 
> So is there a way to get around this?
>
> The other thing is that I would like to send response data back to the client 
> with the POST (DELETE, PUT) request to save resources on the (mobile) client 
> side. Is there a way to do this?
>
>
> Thanks in advance for the help.
>
> Is also searched this mailing list but did not found anything hope I did not 
> missed it somehow.
Am 21.09.2010 11:36, schrieb [email protected]:
> A note to the post before. I went on with trying a bit more and I figured out 
> that it sends data back to the client but only in the case when I don't use 
> any extensions.
> As soon as I use an extension on the POST call it prints me an 404 because it 
> tries to request /blogs.json instead of filtering the extension and call 
> /blogs
>
> Might this be a bug or did I miss a setting?
>
> I do the POST call with a HTML form and I use Restlet 2.1 (tried 2.0 before)
> Using GET this way it is working.
>
> Thanks for you help.

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

Reply via email to