org.androidannotations.annotations.rest
Annotation Type Post


@Retention(value=CLASS)
@Target(value=METHOD)
public @interface Post

Use on methods in Rest annotated class to add a new rest service of type POST.

This annotation as the same constraints as Get.

If an extra parameter is present (ie the only one not mapped with URI placeholders) it will be send in the request body using given converter.

Example :
 @Rest(rootUrl = "http://myserver", converters = MappingJacksonHttpMessageConverter.class)
 public interface MyRestClient {
 
        @Post("/events/new/random")
        Event newEvent();
 
        @Post("/events/new/{id}")
        void newEvent(Event event, int id);
 }
 

See Also:
Rest, Get, Put, Delete, Head, Options

Required Element Summary
 String value
           
 

Element Detail

value

public abstract String value


Copyright © 2010-2014. All Rights Reserved.