diff Framework/Toolbox/OrthancApiClient.h @ 309:14ef1227120f am-callable-and-promise

web services: better handling of failures
author am@osimis.io
date Fri, 28 Sep 2018 15:02:43 +0200
parents b4abaeb783b1
children aad37d0b6407
line wrap: on
line diff
--- a/Framework/Toolbox/OrthancApiClient.h	Tue Sep 25 15:14:53 2018 +0200
+++ b/Framework/Toolbox/OrthancApiClient.h	Fri Sep 28 15:02:43 2018 +0200
@@ -135,6 +135,12 @@
                                    MessageHandler<HttpErrorMessage>* failureCallback = NULL,
                                    Orthanc::IDynamicObject* payload = NULL);
 
+    // schedule a POST request expecting a JSON response.
+    void PostJsonAsyncExpectJson(const std::string& uri,
+                                 const Json::Value& data,
+                                 MessageHandler<JsonResponseReadyMessage>* successCallback,
+                                 MessageHandler<HttpErrorMessage>* failureCallback = NULL,
+                                 Orthanc::IDynamicObject* payload = NULL);
 
   };
 }