- case OC_EH_OK:
- switch (method)
- {
- case OC_REST_PUT:
- case OC_REST_POST:
- // This Response Code is like HTTP 204 "No Content" but only used in
- // response to POST and PUT requests.
- caResult = CA_CHANGED;
- break;
- case OC_REST_GET:
- // This Response Code is like HTTP 200 "OK" but only used in response to
- // GET requests.
- caResult = CA_CONTENT;
- break;
- default:
- // This should not happen but,
- // give it a value just in case but output an error
- caResult = CA_CONTENT;
- OIC_LOG_V(ERROR, TAG, "Unexpected OC_EH_OK return code for method [%d].", method);
- }
+ // Successful Client Request
+ case OC_EH_RESOURCE_CREATED: // 2.01
+ if (method == OC_REST_POST || method == OC_REST_PUT)
+ {
+ caResult = CA_CREATED;
+ }