Skip to main content
1-Visitor
March 24, 2020
Question

C++ REST Client Library

  • March 24, 2020
  • 3 replies
  • 6127 views

Hei Community,

we're searching for a suitable c++ library to perform REST requests and parse Json to integrate into toolkit dlls.

Are there any recomendations?

 

We tryed cpprest/casablanca from microsoft already. We build a sample client without creo and everthing works fine until we integrate it into our creo dll. With this library the dll is not able to be started in creo anymore.

 

Thanks for your suggestions.

3 replies

14-Alexandrite
March 24, 2020

One suggestion would be. You can create Jlink application and do REST operation in Java. If you do not find suitable API in Jlink, you will have to create toolkit application. There are jlink API's to load dll and call C++ methods.

 

I have not tried it. This is my guess.

14-Alexandrite
March 24, 2020

For parsing/building JSON messages - I've used RapidJson in the past before. It is very reliable, very fast, and really has great functionality. It is also a header-only library, which is REALLY NICE if you have to compile across multiple versions of Creo.

Then for performing REST requests, the biggest name on the block is really libcurl, which we compile alongside openssl

Past that, I've heard of others that can be helpful such as POCO: https://pocoproject.org/pro/docs/00153-RemotingNGTutorialPart4.html

 

Hope this helps!

 

James Sullivan

15-Moonstone
March 25, 2020

Hi

 

we are using CURL and JSON CPP ... precompiled as a .lib and then linked into the build.

 

https://github.com/open-source-parsers/jsoncpp

 

Br,

Eike

17-Peridot
March 25, 2020

CREOSON already does this using JSON over HTTP.  (Any language... including C++)

 

It is OpenSource -- so if you wanted to use that core as a foundation and extend using your own DLLs - I am sure it would be pretty easy.

 

Dave