How to send object array as parameter to MVC Controller?
public class FeedStats
{
public long FeedId { get; set; }
public ApiType ApiType { get; set; }
public long UserId { get; set; }
public float ReadTime { get; set; }
public long FeedIndex { get; set; }
public bool IsWebRead { get; set; }
}
In Controller
[HttpPost]
public HttpResponseMessage UpdateFeedStats(FeedStats[] data)
{
}
When i make HttpPost request with Postman with these parameters, the data is always null. Whats an issue?
Headers:
Content-Type: application/json
{
data: [
FeedId: 1,
ApiType: 1,
UserId: 1,
ReadTime: 0.65,
FeedIndex: 1,
IsWebRead: 1
]
}