Can build C++ REST SDK on Centos ?

Dec 11, 2015 at 9:46 AM
I have just view Documentation of C++ REST SDK. I see it is available on Linux(Ubuntu) so what about centos ? Can it build on centos ?
Dec 11, 2015 at 4:50 PM
We have heard success from other users building on CentOS, however we don't officially support it so I don't know exactly what packages you'll need to get to satisfy the dependencies.
Dec 12, 2015 at 7:39 AM
Hi roschuma,
I need http listener, http client, json.
I have already a centos server so i don't want change it to ubuntu now.
Dec 12, 2015 at 10:28 AM
Here's a How to Install on CentOS 7 post:
Dec 13, 2015 at 3:45 PM
Hi BSalita,

I did it follow that post and server listener without error, but client cannot request to server. I don't know what happen on centos.

This is my code:

RESTServer::RESTServer(const std::string p_link)
std::cout << "Init server with root:" << p_link << std::endl;
LOG_INFO("Init server with root:" << p_link);
m_Listener = new  http_listener(http::uri(utility::conversions::to_string_t(p_link)));
m_Listener->support(methods::GET, RESTServer::HandleGET);
m_Listener->support(methods::POST, RESTServer::HandlePOST);
m_Listener->support(methods::PUT, RESTServer::HandlePUT);
m_Listener->support(methods::DEL, RESTServer::HandleDEL);


Client: I use browser to connect server with method default is GET but haven't event in RESTServer::HandleGET
Dec 14, 2015 at 2:55 AM
I know why my server cannot listen because I don't wait after listen. This is my fix :