comparison Framework/Deprecated/Toolbox/IWebService.h @ 940:861c080ef47b

handling httpStatus in WebService error messages
author Alain Mazy <alain@mazy.be>
date Fri, 02 Aug 2019 17:38:31 +0200
parents c35e98d22764
children f6be9412e42a
comparison
equal deleted inserted replaced
924:9ba1e1198e73 940:861c080ef47b
104 ORTHANC_STONE_MESSAGE(__FILE__, __LINE__); 104 ORTHANC_STONE_MESSAGE(__FILE__, __LINE__);
105 105
106 private: 106 private:
107 const std::string& uri_; 107 const std::string& uri_;
108 const Orthanc::IDynamicObject* payload_; 108 const Orthanc::IDynamicObject* payload_;
109 Orthanc::HttpStatus httpStatus_;
109 110
110 public: 111 public:
111 HttpRequestErrorMessage(const std::string& uri, 112 HttpRequestErrorMessage(const std::string& uri,
113 Orthanc::HttpStatus httpStatus,
112 const Orthanc::IDynamicObject* payload) : 114 const Orthanc::IDynamicObject* payload) :
113 uri_(uri), 115 uri_(uri),
114 payload_(payload) 116 payload_(payload),
117 httpStatus_(httpStatus)
115 { 118 {
116 } 119 }
117 120
118 const std::string& GetUri() const 121 const std::string& GetUri() const
119 { 122 {
120 return uri_; 123 return uri_;
124 }
125
126 Orthanc::HttpStatus GetHttpStatus() const
127 {
128 return httpStatus_;
121 } 129 }
122 130
123 bool HasPayload() const 131 bool HasPayload() const
124 { 132 {
125 return payload_ != NULL; 133 return payload_ != NULL;