From d597bb4714e666c924e8a48ad30ebad71a3b45ed Mon Sep 17 00:00:00 2001 From: Zhao Chao Date: Fri, 2 Mar 2018 17:03:44 +0800 Subject: Return 204 instead of 200 for root-disable API As no content will be returned to the client if a root-disable request succeeds, a HTTP 204 (Not Content) response is more appropriate. Redis root-disable scenario test fails because it's return HTTP 204, but all API related tests are expecting a HTTP 200. Although changing Redis root-disable API is a much simpler way to resolve the problem, migrating from HTTP 200 to HTTP 204 should be a better solution. Related tests and documents are also updated accordingly. APIImpact Change-Id: If732a578009fd35436e810fb7ceceefd1ada3778 Signed-off-by: Zhao Chao --- api-ref/source/samples/db-disable-root-user-response-json-http.txt | 2 +- api-ref/source/user-management.inc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'api-ref') diff --git a/api-ref/source/samples/db-disable-root-user-response-json-http.txt b/api-ref/source/samples/db-disable-root-user-response-json-http.txt index 031611ac..17632f6a 100644 --- a/api-ref/source/samples/db-disable-root-user-response-json-http.txt +++ b/api-ref/source/samples/db-disable-root-user-response-json-http.txt @@ -1,4 +1,4 @@ -HTTP/1.1 200 OK +HTTP/1.1 204 No Content Content-Type: application/json Content-Length: 0 Date: Mon, 18 Mar 2013 19:09:17 GMT diff --git a/api-ref/source/user-management.inc b/api-ref/source/user-management.inc index 595c442e..d17be907 100644 --- a/api-ref/source/user-management.inc +++ b/api-ref/source/user-management.inc @@ -92,7 +92,7 @@ Disable root user Disables the root user. -Normal response codes: 202 +Normal response codes: 204 Error response codes: badRequest(400), unauthorized(401), forbidden(403), itemNotFound(404), badMethod(405), overLimit(413), unprocessableEntity(422), -- cgit v1.2.1