Click here to Skip to main content
15,917,005 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
0 down vote
favorite
This is the POST Body iOS is sending me but when I debug in my code my parameter is getting null.

C#
{
OrderTable = (
{
Name = 401;
Status = add;
},
{
Name = 101;
Status = remove;
}
);
}
Is this correct format they are sending me,

My Service is accepting parameter like this

[{
"Name": "",
"Status": "add"
},
{
"Name": "",
"Status": "remove"
}]{Any way to accept this or fix this.

My Post method is like this

public HttpResponseMessage PostOrderTable(OrderTableCollection orderTableCollection)
        {            
            this.orderService.AddTables(orderTableCollection);
            return new HttpResponseMessage(HttpStatusCode.Created);
        }
and OrderTableCollection is like this

[XmlRoot("OrderTables")]
    public class OrderTableCollection : Collection<ordertable>
    {
    }</ordertable>
Posted
Updated 23-Feb-15 21:46pm
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900