4 #include <xxhr/response.hpp> 23 std::shared_ptr<std::promise<xxhr::Response>> sync_promise
24 = std::make_shared<std::promise<xxhr::Response>>();
26 void operator()(
xxhr::Response&& resp) { sync_promise->set_value(resp); };
28 xxhr::Response operator()() {
return sync_promise->get_future().get(); };
main library namespace
Definition: api.hpp:19
Helper object for the non-recommended good old synchronous way of thinking.
Definition: sync.hpp:21
Passed to the unary callback xxhr::on_response. Provides access to request Content and Success...
Definition: response.hpp:18