I need开发者_开发问答 to send integer, string array as pathparam or query string to get the values from the database. The use case is that i have the array of user ids and i need to send it as parameter so it can return the data w.r.t that users only. I am using jboss RestEasy API but not able to find how to pass arrays as pathparam or query string.
Kindly let me know how to do this?
Thanks in advance Shuja
I have never tried for Passing array but i have checked with List<...>
import java.util.List;
@Path("/customers")
public class CustomerResource {
@GET
@Produces("application/xml")
public String getCustomers(
@QueryParam("start") int start,
@QueryParam("size") int size,
@QueryParam("orderBy") List<String> orderBy) {
...
}
}
hope that you get hint form this.
精彩评论