I want to call a rest service written in WCF (which can support both XML and JSON Web Message Formats) from my C++ application.
What is the best solution to achieve this ? I have seen some utilities (gsoap) which create proxy classes for you to be used to call web services.
Can I achieve the same functionality without using any intermediate utility ? As its a rest service and it works using GET/PUT functions which are basic HTTP functions, is there any C++ library/Solution which could be used to invoke these function directly from a c++ application ?
Applications call C API functions defined in C language header files, and a dynamic link library (DLL). Each function call returns an integer result code, defined in the ctgstdat. h header file. A function that completes normally returns the code CTG_STAT_OK .
A RESTful query allows you to send a request or execute an operation by sending a single Universal Resource Identifier (URI) space to Service Manager. In general, the format for the URI resembles the following: http://{host}:{port}/{initialPath}
On Linux, you probably could use curl library (and I guess it is ported to Windows). Curl is a library providing HTTP client functionality to a C or C++ program.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With