Package io.micronaut.http.annotation
Annotation Interface CustomHttpMethod
@Documented
@Retention(RUNTIME)
@Target(METHOD)
@HttpMethodMapping
@Inherited
public @interface CustomHttpMethod
This annotation is designed for non-standard http methods, that you
can provide by specifying the required
method()
property.- Since:
- 1.3.0
- Author:
- spirit-1984
-
Required Element Summary
-
Optional Element Summary
Modifier and TypeOptional ElementDescriptionString[]
The default consumes.String[]
Shortcut that allows setting both theconsumes()
andproduces()
settings to the same media type.String[]
boolean
String[]
Only to be used in the context of a server.
-
Element Details
-
method
String method- Returns:
- The name of the non-standard http method.
-
-
-
value
@AliasFor(annotation=HttpMethodMapping.class,member="value") @AliasFor(annotation=UriMapping.class,member="value") String value- Returns:
- The URI of the route
- Default:
- "/"
-
uri
@AliasFor(annotation=HttpMethodMapping.class,member="value") @AliasFor(annotation=UriMapping.class,member="value") String uri- Returns:
- The URI of the route
- Default:
- "/"
-
uris
@AliasFor(annotation=HttpMethodMapping.class,member="uris") @AliasFor(annotation=UriMapping.class,member="uris") String[] urisOnly to be used in the context of a server.- Returns:
- The URIs of the route
- Default:
- {"/"}
-
produces
- Returns:
- The default produces, otherwise override from controller
- Default:
- {}
-
consumes
The default consumes. Ignored for server request which never a consume a value for a GET request.- Returns:
- The default consumes, otherwise override from controller
- Default:
- {}
-
processes
@AliasFor(annotation=Produces.class,member="value") @AliasFor(annotation=Consumes.class,member="value") String[] processesShortcut that allows setting both theconsumes()
andproduces()
settings to the same media type.- Returns:
- The media type this method processes
- Default:
- {}
-
single
@AliasFor(annotation=Produces.class,member="single") @AliasFor(annotation=Consumes.class,member="single") @AliasFor(annotation=SingleResult.class,member="value") boolean single- Returns:
- Whether a single or multiple items are produced/consumed
- Default:
- false
-