3#ifdef USERVER_TVM2_HTTP_CLIENT
4#error Use components::Http from clients/http.hpp instead
10#include <userver/clients/http/client.hpp>
11#include <userver/components/loggable_component_base.hpp>
12#include <userver/concurrent/async_event_source.hpp>
13#include <userver/dynamic_config/snapshot.hpp>
14#include <userver/utils/statistics/entry.hpp>
16USERVER_NAMESPACE_BEGIN
64 HttpClient(
const ComponentConfig&,
const ComponentContext&);
66 ~HttpClient()
override;
68 clients::
http::Client& GetHttpClient();
73 void OnConfigUpdate(
const dynamic_config::Snapshot& config);
75 void WriteStatistics(utils::statistics::Writer& writer);
77 static std::vector<utils::NotNull<clients::http::Plugin*>> FindPlugins(
78 const std::vector<std::string>& names,
79 const components::ComponentContext& context);
81 const bool disable_pool_stats_;
82 clients::
http::Client http_client_;
83 concurrent::AsyncEventSubscriberScope subscriber_scope_;
84 utils::statistics::Entry statistics_holder_;
88inline constexpr bool kHasValidate<HttpClient> =
true;