|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |
@Retention(value=CLASS) @Target(value={METHOD,TYPE}) public @interface SetsCookie
Use on Get
, Post
, … annotated methods to retrieve and store
cookies from the HTTP response.
value()
is mandatory and define a list of cookie's
names you want to keep.
Each stored cookies can be re-used with RequiresCookie
and
RequiresCookieInUrl
annotations. The getCookie
method
will also be able to read these cookies.
Example :@Rest(rootUrl = "http://myserver", converters = MappingJacksonHttpMessageConverter.class) public interface MyRestClient { @Get("/events/{id}") @SetsCookie(("token"() Event getEvent(long id); @Put("/events/update/") @RequiresCookie("token") void updateEvent(Event event); }
Rest
,
RequiresCookie
,
SetsCookie
Required Element Summary | |
---|---|
String[] |
value
|
Element Detail |
---|
public abstract String[] value
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |