1
如何配置WebApi控制器以讀取作爲參數傳入的所有數據?webApi參數數據長度
客戶:
$.post(url,{id:aHugeData});
控制器:
public class myController : ApiController
{
public List<string> Events(List<Event> id) //there must be 30 items, but I see 7
{
List<string> artists = new List<string>();
foreach (Event e in id)
{
artists.AddRange(e.artists.artist);
}
artists = artists.Distinct().ToList();
return artists;
}
}
在HttpContext的我看到,接收的所有數據。
http://i.imgur.com/wujZB.png 「截圖」 – Evgeniy 2012-04-19 13:34:56