modif
[src/app-framework-binder.git] / src / afb-wsj1-test.cpp
index 059c845..b9a6b06 100644 (file)
@@ -1,16 +1,19 @@
 #include "afb-wsj1.hpp"
 
 void onreply(const char *value){
-       std::cout<< *value<<std::endl;
-       system("PAUSE");
+       std::cout << value << std::endl;
+    exit(0);
 }
 
-int main(){
-    std::string uri,api,verb, req;
-    char * request = (char*)req.c_str();
+int main(int ac, char **av){
+    char*uri=av[1];
+    char*api =av[2];
+    char*verb =av[3]; 
+    char*req =av[4];
     afb::wsj1 sj1;
+    char *x;
     sj1.connect(uri);
-    sj1.call(api.c_str(),verb.c_str(),request,onreply);
-
+    sj1.call(api,verb,req,onreply);
+       std::cin <<x<<std::endl;
     return EXIT_SUCCESS;
 }
\ No newline at end of file