comparison 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
comparison
equal deleted inserted replaced
1566:3be6eb3757c8 1567:9c5d93510414
47 bool alreadySent_; 47 bool alreadySent_;
48 bool convertJsonToXml_; 48 bool convertJsonToXml_;
49 49
50 void CheckStatus(); 50 void CheckStatus();
51 51
52 void SignalErrorInternal(HttpStatus status,
53 const char* message,
54 size_t messageSize);
55
52 public: 56 public:
53 RestApiOutput(HttpOutput& output, 57 RestApiOutput(HttpOutput& output,
54 HttpMethod method); 58 HttpMethod method);
55 59
56 ~RestApiOutput(); 60 ~RestApiOutput();
76 size_t length, 80 size_t length,
77 const std::string& contentType); 81 const std::string& contentType);
78 82
79 void SignalError(HttpStatus status); 83 void SignalError(HttpStatus status);
80 84
85 void SignalError(HttpStatus status,
86 const std::string& message);
87
81 void Redirect(const std::string& path); 88 void Redirect(const std::string& path);
82 89
83 void SetCookie(const std::string& name, 90 void SetCookie(const std::string& name,
84 const std::string& value, 91 const std::string& value,
85 unsigned int maxAge = 0); 92 unsigned int maxAge = 0);