@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);
}
| Modifier and Type | Required Element and Description |
|---|---|
java.lang.String |
value |
Copyright © 2010-2014. All Rights Reserved.