diff Platforms/Wasm/WasmWebService.h @ 303:ed1a4302154f am-callable-and-promise

new messages in wasm too
author am@osimis.io
date Tue, 18 Sep 2018 18:17:26 +0200
parents 3897f9f28cfa
children 14ef1227120f
line wrap: on
line diff
--- a/Platforms/Wasm/WasmWebService.h	Tue Sep 18 18:04:53 2018 +0200
+++ b/Platforms/Wasm/WasmWebService.h	Tue Sep 18 18:17:26 2018 +0200
@@ -37,22 +37,18 @@
 
     void SetBaseUri(const std::string baseUri);
 
-    virtual void ScheduleGetRequest(ICallback& callback,
-                                    const std::string& uri,
-                                    const Headers& headers,
-                                    Orthanc::IDynamicObject* payload);
-
-    virtual void SchedulePostRequest(ICallback& callback,
-                                     const std::string& uri,
-                                     const Headers& headers,
-                                     const std::string& body,
-                                     Orthanc::IDynamicObject* payload);
-
-    virtual void GetAsync(const std::string& relativeUri,
+    virtual void GetAsync(const std::string& uri,
                           const Headers& headers,
                           Orthanc::IDynamicObject* payload,
-                          MessageHandler<IWebService::NewHttpRequestSuccessMessage>* successCallback,
-                          MessageHandler<IWebService::NewHttpRequestErrorMessage>* failureCallback);
+                          MessageHandler<IWebService::HttpRequestSuccessMessage>* successCallable,
+                          MessageHandler<IWebService::HttpRequestErrorMessage>* failureCallable);
+
+    virtual void PostAsync(const std::string& uri,
+                           const Headers& headers,
+                           const std::string& body,
+                           Orthanc::IDynamicObject* payload,
+                           MessageHandler<IWebService::HttpRequestSuccessMessage>* successCallable,
+                           MessageHandler<IWebService::HttpRequestErrorMessage>* failureCallable);
 
     virtual void Start()
     {