문제

Is it possible to pass a list of Integers into a HttpPost/HttpGet/HttpPut etc, and have it passed into the resource?

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
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top