diff 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
line wrap: on
line diff
--- a/Framework/Deprecated/Toolbox/IWebService.h	Mon Jul 22 14:29:23 2019 +0200
+++ b/Framework/Deprecated/Toolbox/IWebService.h	Fri Aug 02 17:38:31 2019 +0200
@@ -106,12 +106,15 @@
     private:
       const std::string&              uri_;
       const Orthanc::IDynamicObject*  payload_;
+      Orthanc::HttpStatus             httpStatus_;
 
     public:
       HttpRequestErrorMessage(const std::string& uri,
+                              Orthanc::HttpStatus httpStatus,
                               const Orthanc::IDynamicObject* payload) :
         uri_(uri),
-        payload_(payload)
+        payload_(payload),
+        httpStatus_(httpStatus)
       {
       }
 
@@ -120,6 +123,11 @@
         return uri_;
       }
 
+      Orthanc::HttpStatus GetHttpStatus() const
+      {
+        return httpStatus_;
+      }
+
       bool HasPayload() const
       {
         return payload_ != NULL;