【发布时间】:2017-01-06 01:47:20
【问题描述】:
对于将GET 和POST 用于Ajax 调用的理想情况,我有点困惑。以前当我们使用ASP.NET MVC 和KnockoutJS 时,我们曾经将自定义$.postJson(url,data,callback) 从jQuery 调用到我们的MvcController(即使是GET 操作)。最近我们使用ASP.NET Web API 和AngularJS 和使用$http(url,method) 和GET 并在我们的url 属性中传递搜索参数,并使用ApiController 属性在ApiController 中捕获它们。
现在我的问题是,使用GET 和POST 的理想场景和最佳实践应该是什么(附注:不要从CRUD 运营角度回答)。
【问题讨论】:
标签: angularjs asp.net-mvc rest asp.net-web-api