Your opinion will help to improve our service
Leave a feedback >#include <userver/clients/http/response_future.hpp>
Allows to perform a request concurrently with other work without creating an extra coroutine for waiting.
Definition at line 29 of file response_future.hpp.
Public Member Functions | |
ResponseFuture (ResponseFuture &&other) noexcept | |
ResponseFuture & | operator= (ResponseFuture &&) noexcept |
ResponseFuture (const ResponseFuture &)=delete | |
ResponseFuture & | operator= (const ResponseFuture &)=delete |
void | Cancel () |
Cancel the request in flight. | |
void | Detach () |
Keep executing the request but do not care any more about the result. It is fine to destroy this future after Detach(), the request will continue execution. | |
std::future_status | Wait () |
Stops the current task execution until the request finishes. | |
std::shared_ptr< Response > | Get () |
Wait for the response and return it. | |
void | SetCancellationPolicy (CancellationPolicy cp) |
std::future_status clients::http::ResponseFuture::Wait | ( | ) |
Stops the current task execution until the request finishes.
clients::http::CancelException | if the current task is being cancelled |