{title:'@Query', updated:'8.2.0', updated:'9.0.0'}

The {@link oaj.http.annotation.Query @Query} annotation can be applied to arguments of @RemoteOp-annotated methods to denote that they are query parameters on the request.

Example:

| @Remote(path="/myproxy") | public interface MyProxy { | | // Explicit names specified for query parameters. | @RemoteGet | String parameters( | @Query("foo") String foo, | @Query("bar") MyPojo pojo); | | // Multiple values pulled from a PartList object. | // Same as @Query("*"). | @RemoteGet | String partList(@Query PartList partList); | | // Multiple values pulled from a Map. | // Same as @Query("*"). | @RemoteGet | String map(@Query Map<String,Object> map); | | // Multiple values pulled from a bean. | // Same as @Query("*"). | @RemoteGet | String bean(@Query MyBean myBean); | | // An entire query string as a String. | // Same as @Query("*"). | @RemoteGet | String string(@Query String string); | | // An entire query string as a Reader. | // Same as @Query("*"). | @RemoteGet | String reader(@Query Reader reader); | }

Single-part arguments (i.e. those with name != "*") can be any of the following types:

Multi-part arguments (i.e. those with name == "*" or empty) can be any of the following types:

See the link below for information about supported data types in OpenAPI serialization.