【发布时间】:2012-07-17 12:55:37
【问题描述】:
restful api 必须使用 get、post、put 或 delete 请求方法。提交的行为和数据完全由 uri 字符串决定。没有查询参数或发布变量。
这是真的吗?
有效:http://example.com/foo/84
无效:http://example.com/foo/?value=84
有效:
$.ajax({
type: 'POST',
url: "http://example.com/foo/84",
success: success,
dataType: dataType
});
无效:
$.ajax({
type: 'POST',
url: "http://example.com/foo/",
data: 84,
success: success,
dataType: dataType
});
编辑 到目前为止的两个答案,并且相互矛盾。
【问题讨论】:
标签: rest restful-url