How to pass int[]
to HttpGet
method in ASP.NET Core? (Not as query parameters!)
Every post I found talks about query params, but query params are not required.
I would like something like that:
[HttpGet("List/{ids}")]
public async Task<ActionResult<ViewItemModel[]>> List(int[] ids)
but ids are empty array. I call controller method with url: http://localh.../List/2062,2063,2064
.
Swagger (Swashbuckle) calls method exactly the same.
I found this post but it is 5 years old and not for ASP.NET Core.