Annotation Type QUERY
-
@Target(METHOD) @Retention(RUNTIME) @HttpMethod("QUERY") public @interface QUERY
JAX-RS designator for theQUERYHTTP method (RFC 10008), used for safe, idempotent read operations that require a request body (e.g. JSON queries), replacing the semantic anti-pattern of usingPOSTsolely to carry a payload.QUERYis the real, primary method for these endpoints. APOSTfallback (via theX-HTTP-Method-Override: QUERYrequest header, seeHTTPHeaders.X_HTTP_METHOD_OVERRIDE) exists on the server for network intermediaries or client libraries that cannot sendQUERYdirectly — the fallback exists for compatibility, not the other way around.Lives in
resource-registry-api(rather than the server module) so that both the server (to annotateQUERYresource methods) and the client (to know which HTTP method a given call is semantically performing) share the same vocabulary.- Author:
- Luca Frosini (ISTI - CNR)