我的Web API上有以下代码......
public class OrderDetail {
public string Name { get; set; }
public string Adress { get; set; }
}
config.Routes.MapHttpRoute(
name: "DefaultPostApi",
routeTemplate: "api/{controller}/{action}/{passKey}"
);
[System.Web.Http.AcceptVerbs("GET", "POST")]
[System.Web.Http.HttpGet]
public HttpResponseMessage AddPost(string passKey, OrderDetail order)
{
// string PostedOrderDetailName = order.Name
}
我想知道如何将Order Detail类从我的客户端发送到服务器WebAPI
答案 0 :(得分:1)