rest - 在 RESTful Web 服务中,增量功能应使用什么 HTTP 方法?

标签 rest http

举个例子:

我有一个 RESTful Web 服务。它有一个 GET/status/:item_id 端点。

我想允许项目进展到下一个状态,但我不想允许指定状态: {SOME-HTTP-METHOD}/status/:item_id/next

我应该使用什么 HTTP 方法?上面列出的方法是 RESTful 吗?

最佳答案

POST 请求似乎是 the most semantic :

The POST method is used to request that the origin server accept the entity enclosed in the request as a new subordinate of the resource identified by the Request-URI in the Request-Line. POST is designed to allow a uniform method to cover the following functions:

  • Annotation of existing resources;
  • (others...)

关于rest - 在 RESTful Web 服务中,增量功能应使用什么 HTTP 方法?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45242875/

相关文章:

ios - 如何配置用于身份验证的 HTTP header ?

java - Jersey 在使用 ContainerRequestContext.abortWith() 后为每次调用抛出 NPE

android - 登录 API 服务器失败

http - IIS 使用 web.config 缓存所有具有特定扩展名的文件

http - 为什么 RoundTrip 不应该修改请求?

javascript - 通过 jsonreststore 进行身份验证,将 dojo.grid 绑定(bind)到 Restful 服务

java - Spring Boot + Spring Security Restful 登录

c# - 在c#中休息调用post方法

http - AWS Lambda 发布

angularjs - Angular $http promise 总是解决