Closed
Description
With this we can use Map<String, ?>
parameter types for @QueryParam
, @Header
and @FormParam
and these are then passed as a map to the set multiple query parameters, headers, or form parameters.
Example
@Get("{uid}/withParams")
HttpResponse<String> withParams(long uid, @QueryParam Map<String, ?> params);
Generates the code below ...
// GET {uid}/withParams
@Override
public HttpResponse<String> withParams(long uid, Map<String,?> params) {
return clientContext.request()
.path("moo").path(uid).path("withParams")
.queryParam(params)
.GET()
.asString();
}
Note that the .queryParam(params)
sets the map of query parameters to the request.