2

I have a C++ program, and I want to make it as a web service listening to http request. I am a newbie to web development. Could some one give me a guild to tools/library/APIs that can help me build it. I know Java program usually restlet. What is the equivalent of restlet for C++?

László Papp
  • 51,870
  • 39
  • 111
  • 135
realmq
  • 429
  • 4
  • 18
  • gSOAP is the first result for "c++ web services" and sounds like what you want. http://www.cs.fsu.edu/~engelen/soap.html – nickrak Aug 17 '13 at 04:51
  • SOAP is a more complicate protocol then REST used in restlet. REST means encoding information as simple strings with more complex information passed as request body. A C++ REST library was recommended [here](http://stackoverflow.com/questions/1961238/can-anyone-recommend-a-good-c-c-restful-framework) – cpp Aug 17 '13 at 07:09
  • I am looking at CPPCMS, CPPSERV, and A Stream Socket API for C++:http://www.pcs.cnu.edu/~dgame/sockets/socketsC++/sockets.html, can anyone tell me which is better, and the comparison between them – realmq Aug 20 '13 at 02:33
  • What was the reason for not selecting an answer? – László Papp May 30 '14 at 01:50
  • Asynchronous C++11 RESTful framework: https://github.com/Corvusoft/restbed – Ben Crowhurst Jun 19 '15 at 15:55

4 Answers4

3

I would recommend C++ web toolkit

http://www.webtoolkit.eu/wt

or

cppcms.sourceforge.net

László Papp
  • 51,870
  • 39
  • 111
  • 135
1

The old, classic way to make existing C/C++ executable available on the web is through CGI. A web server that supports CGI can be configured to interpret an URL as a reference to a CGI script that can be directly your executable or a simple wrapper around it. The web for fields are provided as standard input and the program's output becomes the server response.

Audrius Meškauskas
  • 20,936
  • 12
  • 75
  • 93
0

I am working on something similar in Python and I am also newcomer on this field. You might be interested in sockets, see: http://goo.gl/r6X4u, http://goo.gl/enffd

gen
  • 9,528
  • 14
  • 35
  • 64
0

The QxtWeb module provides tools for creating web services using Qt.

Also, if you are using Visual C++ then here is an introduction how to create web services.

cpp
  • 3,743
  • 3
  • 24
  • 38