REST client in C++

12,051

Solution 1

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.

Solution 2

I cannot recommend any integrated solution but what you can do is use:

  1. Transport: neon, serf or libcurl (all of them have advs and disadvs)
  2. XML parsing: libexpat or libxml2
  3. JSON parsing: Jansson or JSON Spirit

Solution 3

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.

Share:
12,051
Soumen
Author by

Soumen

Updated on July 21, 2022

Comments

  • Soumen
    Soumen almost 2 years

    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.

  • Soumen
    Soumen over 11 years
    Thanks @Michael-O 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.
  • Michael-O
    Michael-O over 11 years
    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.
  • Soumen
    Soumen over 11 years
    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.
  • Motti
    Motti about 3 years
    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.