Invoking REST services using the RxCurl library
The RxCurl
library, written by Kirk Shoop, originally supported GET
and POST
verbs. The Twitter analysis app only warrants that. The authors of the book have added support for the PUT
and DELETE
verbs. You can refer to the source of rxcurl.h
,to see necessary changes made to support these additional verbs, in the Github repository: Let us see how we can use the modified library to make calls to the REST server, we wrote above.
#include <iostream> #include <stdio.h> #include <iostream> #include <stdio.h> #include <stdlib.h> #include <map> #include <chrono> using namespace std; using namespace std::chrono; //////////////////////// // include Curl Library and // Rxcpp library // #include <curl/curl.h> #include <rxcpp/rx.hpp> using namespace rxcpp; using namespace rxcpp::rxo; using namespace rxcpp::rxs; ////////////////////////// // include the modified rxcurl library...