是否可以定义当PUT to /asdf
空请求正文发生时PUT to /asdf
与{ "value": "somthing" }
的请求正文{{1}}发生时会发生什么。
答案 0 :(得分:3)
假设两个请求的媒体类型相同且响应HTTP状态代码不同,这应该是合法的:
# PUT /asdf
+ Request Empty (application/json)
+ Headers
Content-Lenght: 0
+ Response 400
+ Request With Value (application/json)
{ "value": "somthing" }
+ Response 204