Define a successful response.
Response Code
The response code is a numeric value returned from the remote server to indicate how the server interpreted the request. Generally a 200
response code is associated with a successful request. However, other response codes can also be associated with a successful request.
Response Body
If a 200
response code does not completely define a successful request. We may also want to search the response body for a success message.
Example Response Body
In this example response body we would use the key named success
and the value true
to define a successful request.
1 2 3 4 5 6 7 8 9 | { "status_code":200, "body": { "orderNumber":"121", "success":true, "msg":"Order Processed" } } |