The HTTP Status 200 (OK) status code indicates that the request has been processed successfully on server. The response payload depends on HTTP method which was selected for request.
HTTP Status 200 – Response Payload
|HTTP Method||Response Payload|
|GET||An entity corresponding to the requested resource is sent in the response.|
|HEAD||Response has only HTTP header fields and no payload is sent in response.|
|POST||Response generally contain information about progress status representation or result of action that was performed in request.|
|PUT||Progress status representation of request is sent in response.|
|DELETE||Progress status representation of request is sent in response.|
|OPTIONS||A list of valid request methods associated with the resource using Allow header. e.g.|
Allow: HEAD, GET, OPTIONS Content-Length: 18 Content-Type: text/plain;charset=UTF-8 Date: Thu, 06 Apr 2017 06:43:59 GMT Server: Apache-Coyote/1.1
|TRACE||A representation of the request message as received by the end server.|
- A 200 response always has a payload, though an origin server MAY generate a payload body of zero length or empty payload.
- If server does not want to send any payload in response, then it should send HTTP status 204 (No Content) instead.
- By default, 200 (OK) response (header and payload) are cacheable. If chaching needs to be overridden then response must include cache respective cache headers.
Reference: 200 OK