mirror of
https://github.com/Icinga/icinga2.git
synced 2025-09-26 02:58:43 +02:00
HTTP: send http status accepted
where appropriate
This better reflects the request handling, since the headers are sent before the request is fully processed. This status code just indicates that we successfully accepted the request but is not guaranteed that all the subsequent actions will also be successful.
This commit is contained in:
parent
e7c088b05b
commit
e3fa5f4ae5
@ -120,7 +120,7 @@ bool ActionsHandler::HandleRequest(
|
||||
Dictionary::Ptr result = new Dictionary{{"results", new ValueGenerator{objs, generatorFunc}}};
|
||||
result->Freeze();
|
||||
|
||||
response.result(http::status::ok);
|
||||
response.result(http::status::accepted);
|
||||
HttpUtility::SendJsonBody(response, params, result, yc);
|
||||
|
||||
return true;
|
||||
|
@ -130,7 +130,7 @@ bool DeleteObjectHandler::HandleRequest(
|
||||
Dictionary::Ptr result = new Dictionary{{"results", new ValueGenerator{objs, generatorFunc}}};
|
||||
result->Freeze();
|
||||
|
||||
response.result(http::status::ok);
|
||||
response.result(http::status::accepted);
|
||||
HttpUtility::SendJsonBody(response, params, result, yc);
|
||||
|
||||
return true;
|
||||
|
@ -178,7 +178,7 @@ bool ModifyObjectHandler::HandleRequest(
|
||||
Dictionary::Ptr result = new Dictionary{{"results", new ValueGenerator{objs, generatorFunc}}};
|
||||
result->Freeze();
|
||||
|
||||
response.result(http::status::ok);
|
||||
response.result(http::status::accepted);
|
||||
HttpUtility::SendJsonBody(response, params, result, yc);
|
||||
|
||||
return true;
|
||||
|
@ -321,7 +321,7 @@ bool ObjectQueryHandler::HandleRequest(
|
||||
Dictionary::Ptr results = new Dictionary{{"results", new ValueGenerator{objs, generatorFunc}}};
|
||||
results->Freeze();
|
||||
|
||||
response.result(http::status::ok);
|
||||
response.result(http::status::accepted);
|
||||
HttpUtility::SendJsonBody(response, params, results, yc);
|
||||
|
||||
return true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user