As far as the code is concerned, you should consider the following...
FromUri:
[HttpGet]
public HttpResponseMessage GetListFromUri([FromUri] List<int> ids)
{
//do some stuff with the List
}
FromBody:
[HttpPost]
public HttpResponseMessage GetListFromBody([FromBody] List<int> ids)
{
//do some stuff with the List
}
Also have a look at how parameter binding works in Web Api.
https://www.asp.net/web-api/overview/formats-and-model-binding/parameter-binding-in-aspnet-web-api
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.