Mercurial > hg > orthanc
diff Core/HttpServer/HttpOutput.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 | 3606278d305e |
children | d73124f6b439 |
line wrap: on
line diff
--- a/Core/HttpServer/HttpOutput.h Fri Aug 21 17:37:13 2015 +0200 +++ b/Core/HttpServer/HttpOutput.h Sun Aug 23 09:49:16 2015 +0200 @@ -146,7 +146,20 @@ return isGzipAllowed_; } - void SendStatus(HttpStatus status); + void SendStatus(HttpStatus status, + const char* message, + size_t messageSize); + + void SendStatus(HttpStatus status) + { + SendStatus(status, NULL, 0); + } + + void SendStatus(HttpStatus status, + const std::string& message) + { + SendStatus(status, message.c_str(), message.size()); + } void SetContentType(const char* contentType) {