Passing a list of int to a HttpGet request
问题 I have a function similar in structure to this: [HttpGet] public HttpResponseMessage GetValuesForList(List<int> listOfIds) { /* create model */ foreach(var id in listOfIds) model.Add(GetValueForId(id) /* create response for model */ return response; } However, when I do a Get request for the method: {{domain}}/Controller/GetValuesForList?listOfIds=1&listOfIds=2 I get an error when debugging stating that listOfIds is null. In our controller we have a number of public HttpGet methods that work