Has anybody successfully tried any C++ REST library (client) in their enterprise product? It can be collection of software stack, but it should have the capability to run on all platforms, i.e.: Windows, Linux, Solaris, AIX, HP-UX.
REST client in C++
I've had plenty of success using libcurl against REST servers. Perhaps you could be more specific in your needs (support for default actions? support for different http keywords ? Supports deserialization of xml/json ?) –
Bullivant
after looking into java REST client implementation here are few key support that are required. HttpClient like support (like @Michael-O mentioned transport layer). 2. serialization support for XML (here i will prefer something which is having a good binding with schema - even though looks anti-REST) so that developers don't have to write xml parsers everywhere. 3. Not evaluated JSON support yet. –
Insensible
C++ REST SDK is an actively developed C++ REST client that is currently supported in Windows, Mac OS X, iOS and Android. It is also licensed under Apache License 2.0 which opens up a range of customizations on the library to suit your needs.
In 2021 cpprestsdk is in maintenance mode and we do not recommend its use in new projects. We will continue to fix critical bugs and address security issues. –
Lauer
How about Ubuntu? –
Overt
You may want to check thin REST client for C++ at https://github.com/mrtazz/restclient-cpp.
It is a C++ wrapper around good and stable multiprotocol, multiplatform libcurl library.
Here is the list for most useful C++ libraries include network library: https://en.cppreference.com/w/cpp/links/libs
you can see listed can be used as REST client library:
- Boost.Beast
- C++ REST SDK
- curlpp
For light weight usage, I am using libcpr/cpr in laoshanxi/app-mesh replaced cpprestsdk. –
Auspicious
I cannot recommend any integrated solution but what you can do is use:
- Transport: neon, serf or libcurl (all of them have advs and disadvs)
- XML parsing: libexpat or libxml2
- JSON parsing: Jansson or JSON Spirit
Thanks @Grandmotherly but this is very crude stack to begin with (ie: it does all the job requred but still will need lot of boilerplate code to be implemented by the developer). What i am looking at something more in terms with java implementation of REST HttpClient (more like cassandra) but not tied to single platform. –
Insensible
I doubt that you will find something functionally similar to any Java-based client in C++. The second problem is that you want it portable the above libraries do other client maybe not or they depent ono the above. –
Grandmotherly
agreed. looks like c++ is not having much mature lib to handle REST. I was curious on that in case some implementaion like gSOAP has been done. hope this thread will get better answers later. –
Insensible
© 2022 - 2024 — McMap. All rights reserved.