hello,
usually, what's inside @Get is the media type (as listed in
MetadataService) peferred by the client for the returned
representation (Accept HTTP header), so the proper GET handler will be
called, depending upon which 'flavour' of representation the client
prefers (accepts), for example:
@Get("xml")
public Representation getXML() {
}
@Get("html")
public Representation getHTML() {
}
@Get("json")
public Representation getJSON() {
}
all inside the same interface/class. I have code like that and it
works fine, calling the proper getXXX according to the value of the
Accept HTTP header in the request: Accept:text/xml will call
@Get("xml"), Accept:application/json will call @Get("json") and so on.
On Fri, Jun 25, 2010 at 8:30 PM, <[email protected]> wrote:
> hi,
>
> i've an interface with two functions annotated with @get
>
> public interface HelloWorld {
> �...@get("hello")
> public String hello();
> �...@get("test2")
> public String test2();
> }
>
> when i execute the client always the first function is executed but never
> test2 function.
> if i change @get annotation on test2 for @put or any other one everything
> works nice.
>
> any tip to reuse the same annotation ??
>
> ------------------------------------------------------
> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2626099
>
--
Fabián Mandelbaum
IS Engineer
------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2626244