Replies: 4 comments
-
Hey @davewhit3 we are trying to limit the user to not deviate from the REST standards - so 201 response for created resource. We will support 202 and 204 for ACCEPTED and NO CONTENT. But we would not agree on sending 200 for a POST request. |
Beta Was this translation helpful? Give feedback.
-
@vipul-rawat ok, but what if you don't create any new resource? |
Beta Was this translation helpful? Give feedback.
-
@davewhit3 so if there is no creation of data, the POST method should not be used according to RESTful design. As for response headers we are in talks about how to support headers while keeping it simple for users to not worry about them too much. |
Beta Was this translation helpful? Give feedback.
-
It's not that clear.
Great! I'm waiting for it! |
Beta Was this translation helpful? Give feedback.
-
Describe the bug
I don't have option to set response code. [source code]
In REST with a POST method and a status code of
201
I could send a location header, but it could be200
,202
or204
.https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/201
The code is
Expected behavior
I can set the response code and headers.
Environments (please complete the following information):
Beta Was this translation helpful? Give feedback.
All reactions