I have defined GET method as described below:
@GET
@Produces("text/plain")
@Path("method/{id}/{value}")
public void method(@PathParam("ids") final String id, @PathParam("value") final String value) {}
It allows me to pass one id and value. How can I pass a bunch of pairs id/value to this method ?
one way to do it is to create your-own-protocol, something like this:
and then, in your code parse the “protocol”:
but it pretty ugly
the second one is to use POST body, in that case you can’t use GET, and you should create a ValuesMapObject, that holds a map between each id to it value and send it from the client, in that case the function will be look like this: