diff Core/HttpClient.h @ 2041:9f61ca1e3eb3

OrthancPluginHttpClient can return the HTTP headers of the answer
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 21 Jun 2016 17:08:09 +0200
parents 6ea2e264ca50
children 21a8ca9ad928
line wrap: on
line diff
--- a/Core/HttpClient.h	Tue Jun 21 16:34:30 2016 +0200
+++ b/Core/HttpClient.h	Tue Jun 21 17:08:09 2016 +0200
@@ -72,10 +72,10 @@
     void operator= (const HttpClient&);  // Assignment forbidden
     HttpClient(const HttpClient& base);  // Copy forbidden
 
-    bool ApplyInternal(std::string& answer,
+    bool ApplyInternal(std::string& answerBody,
                        HttpHeaders* answerHeaders);
 
-    bool ApplyInternal(Json::Value& answer,
+    bool ApplyInternal(Json::Value& answerBody,
                        HttpHeaders* answerHeaders);
 
   public:
@@ -148,26 +148,26 @@
 
     void ClearHeaders();
 
-    bool Apply(std::string& answer)
+    bool Apply(std::string& answerBody)
     {
-      return ApplyInternal(answer, NULL);
+      return ApplyInternal(answerBody, NULL);
     }
 
-    bool Apply(Json::Value& answer)
+    bool Apply(Json::Value& answerBody)
     {
-      return ApplyInternal(answer, NULL);
+      return ApplyInternal(answerBody, NULL);
     }
 
-    bool Apply(std::string& answer,
+    bool Apply(std::string& answerBody,
                HttpHeaders& answerHeaders)
     {
-      return ApplyInternal(answer, &answerHeaders);
+      return ApplyInternal(answerBody, &answerHeaders);
     }
 
-    bool Apply(Json::Value& answer,
+    bool Apply(Json::Value& answerBody,
                HttpHeaders& answerHeaders)
     {
-      return ApplyInternal(answer, &answerHeaders);
+      return ApplyInternal(answerBody, &answerHeaders);
     }
 
     HttpStatus GetLastStatus() const
@@ -247,8 +247,14 @@
 
     static void SetDefaultTimeout(long timeout);
 
-    void ApplyAndThrowException(std::string& answer);
+    void ApplyAndThrowException(std::string& answerBody);
+
+    void ApplyAndThrowException(Json::Value& answerBody);
 
-    void ApplyAndThrowException(Json::Value& answer);
+    void ApplyAndThrowException(std::string& answerBody,
+                                HttpHeaders& answerHeaders);
+
+    void ApplyAndThrowException(Json::Value& answerBody,
+                                HttpHeaders& answerHeaders);
   };
 }