Timeout with restc-cpp

4 days ago 9
ARTICLE AD BOX

I have the following code to execute a PUT to a given address by means of the restc-cpp library:

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 { ... }

I would like to set a timeout for the execution of this PUT, but I do not find anything for this in the documentation of restc-cpp. Do you know how to do this? Thanks

Read Entire Article