Mercurial > hg > orthanc
diff Core/RestApi/RestApiOutput.h @ 1567:9c5d93510414
If error while calling the REST API, the answer body contains an error description
author | jodogne |
---|---|
date | Sun, 23 Aug 2015 09:49:16 +0200 |
parents | 8bd0d897763f |
children | b1291df2f780 |
line wrap: on
line diff
--- a/Core/RestApi/RestApiOutput.h Fri Aug 21 17:37:13 2015 +0200 +++ b/Core/RestApi/RestApiOutput.h Sun Aug 23 09:49:16 2015 +0200 @@ -49,6 +49,10 @@ void CheckStatus(); + void SignalErrorInternal(HttpStatus status, + const char* message, + size_t messageSize); + public: RestApiOutput(HttpOutput& output, HttpMethod method); @@ -78,6 +82,9 @@ void SignalError(HttpStatus status); + void SignalError(HttpStatus status, + const std::string& message); + void Redirect(const std::string& path); void SetCookie(const std::string& name,