简体   繁体   中英

Jersey | List<Object> into client post/get/put request?

是否可以将整数列表传递给HttpPost / HttpGet / HttpPut等,并将其传递给资源?

public <ReturnType> methodName(@<Jersey annotation> List<Object> objects)

Something like this?

@GET
@Path("/resource")
public Response restMethod(@QueryParam("num") List<Integer> ints)

Which can then be called like:

http://localhost/resource?num=1&num=2&num=3

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM