hi,

OK - I managed to figure out that the method should go as a query param on
the URL instead of a form variable:

http://mysite.com/entity?method=PUT

The form now contains only one field (named "json") with the value holding
the object's json representation.

I now get a converter error:

2010 7:02:06 PM org.restlet.service.ConverterService toObject
WARNING: Unable to find a converter for this representation :
[application/x-www-form-urlencoded]

Any clue?

thanks,

Chen.

On Mon, Apr 12, 2010 at 12:51, Chen Bekor <[email protected]> wrote:

> hi,
>
> I'm trying to use the tunneling feature of Restlet in order to do a @Put
> operation via a simple form POST.
>
> My method is annotated as follows:
>
> @Put("json")
>
> My form contain two fields:
>
> "method" with the value "PUT"    (from the docs I think this is the way to
> tunnel a RESTful action)
>
> and another param called "json"
>
> which holds the Object that I would like to save into the DataStore.
>
> I get the following response:
>
> HTTP/1.1 405 Method Not Allowed
> Content-Type: text/html; charset=ISO-8859-1
> Date: Mon, 12 Apr 2010 09:37:28 GMT
> Accept-Ranges: bytes
> Allow: GET, PUT
> Server: Restlet-Framework/2.0snapshot
> Content-Length: 402
>
> <html>
> <head>
>    <title>Status page</title>
> </head>
> <body style="font-family: sans-serif;">
> <h3>The method specified in the request is not allowed for the resource
> identified by the request URI</h3><p>You can get technical details <a href="
> http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.6
> ">here</a>.<br>
> Please continue your visit at our <a href="/">home page</a>.
> </p>
> </body>
> </html>
>
>
> Am I doing something wrong?
>
> Thanks,
>
> Chen.
>

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

Reply via email to