How to send a list of integers to web api 2 get request?
问题 I am trying to accomplish this task in which I need to send a list of id's (integers) to a web api 2 get request. So I've found some samples here and it even has a sample project, but it doesn't work... Here is my web api method code: [HttpGet] [Route("api/NewHotelData/{ids}")] public HttpResponseMessage Get([FromUri] List<int> ids) { // ids.Count is 0 // ids is empty... } and here is the URL which I test in fiddler: http://192.168.9.43/api/NewHotelData/?ids=1,2,3,4 But the list is always