Tagged: REST

Giving some REST to your C++ code: embedding the SHTTPD server. 2,900

Giving some REST to your C++ code: embedding the SHTTPD server.

Wanting to turn the Ploggs, into more RESTful devices, I needed to add a web server (HTTP) to the C++ code managing the Ploggs. After comparing and trying a number of lightweight web servers (Apache was not an option for this kind of small app) I picked SHTTPD, mainly because: It was one of the few I managed to embed in my C++ code (I’m not a C expert…) It offered the possibility of registering call back methods when a particular URL is called, which makes it a quite good candidate for a REST interface. Here is how I did...