10#include <userver/clients/http/response.hpp>
11#include <userver/compiler/select.hpp>
12#include <userver/engine/deadline.hpp>
13#include <userver/engine/future.hpp>
14#include <userver/engine/impl/context_accessor.hpp>
16USERVER_NAMESPACE_BEGIN
18namespace clients::
http {
28class ResponseFuture
final {
30 ResponseFuture(ResponseFuture&& other)
noexcept;
31 ResponseFuture& operator=(ResponseFuture&&)
noexcept;
32 ResponseFuture(
const ResponseFuture&) =
delete;
33 ResponseFuture& operator=(
const ResponseFuture&) =
delete;
40 std::future_status Wait();
42 std::shared_ptr<Response> Get();
46 engine::impl::ContextAccessor* TryGetContextAccessor()
noexcept;
48 ResponseFuture(engine::Future<std::shared_ptr<Response>>&& future,
49 std::shared_ptr<RequestState> request);
53 engine::Future<std::shared_ptr<Response>> future_;
54 engine::Deadline deadline_;
55 std::shared_ptr<RequestState> request_state_;
56 bool was_deadline_propagated_{
false};