Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
是否可以定义发生PUT to /asdf空请求正文时发生的情况与发生PUT to /asdf此请求正文时发生的情况{ "value": "somthing" }。
PUT to /asdf
{ "value": "somthing" }
假设两个请求的媒体类型相同并且响应 HTTP 状态代码不同,这应该是合法的:
# PUT /asdf + Request Empty (application/json) + Headers Content-Lenght: 0 + Response 400 + Request With Value (application/json) { "value": "somthing" } + Response 204