Hi,
This question came up during working with web services(in java) but I guess could apply in all kind of web applications (http).
If an HTTP client sends a POST to a server then, a 202 Accepted has the meaning (according to HTTP protocol) that the POST has been accepted and the request will be eventually processed.
Under other conditions, the server could send a 200 OK response with NO body, if there is no response body to send to the client (may be the request POST does not actually trigger a response body).
Although conceptually, there is a difference between these 2 cases, i.e.
202 Accepted -> Request ok, will be processed
200 OK Nobody -> Request ok, no response body
In real programming I do not think it should make a difference to the HTTP client code the first or the second case. I have noticed, on some java web services frameworks that these 2 cases are interchangeable, and want to know if it is the same universally, i.e. in any kind of HTTP client.
Because in both cases, the HTTP response code is valid, and there is no response to work with. And in some cases there is a 202 Accepted but in others there is a 200 OK and the response body has an empty tag i.e. <root></root>
the other elements are missing.
Does anyone has knowledge on this?
Thanks