Annotation Interface Get
GET requests are used to retrieve data from the server and should be idempotent and safe (no side effects). They typically don't include request bodies and use path parameters and query parameters for input.
Path Configuration: The annotation value specifies the path pattern for this
endpoint, which is combined with the HttpEndpoint
class-level path prefix to form the
complete URL.
Path Parameters: Use {paramName}
in the path to extract URL segments
as method parameters. Parameters can be strings, numbers, or other primitive types.
Query Parameters: Access query parameters via
RequestContext.queryParams()
when extending AbstractHttpEndpoint
or
injecting RequestContext
.
Response Types: GET methods can return strings, objects (serialized to JSON),
HttpResponse
for full control, or CompletionStage<T>
for asynchronous responses.
-
Optional Element Summary
Optional Elements
-
Element Details
-
value
String value- Default:
""
-