Код: Выделить всё
auto rest_client = RestClient::Create();
auto done = rest_client->ProcessWithPromise([&mess,AI_IP,AI_port,Auth_token](Context& ctx){
auto reply = RequestBuilder(ctx).Put("http://ip_address:port/").Data(message).Execute();
});
try
{
done.get();
}
catch(const exception& ex)
{
...
}
catch(const boost::exception& ex)
{
...
}
RESTC_CPP_IN_COROUTINE_CATCH_ALL
{
...
}
Подробнее здесь: https://stackoverflow.com/questions/798 ... -restc-cpp