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/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
63 HttpClient(
const ComponentConfig&,
const ComponentContext&);
65 ~HttpClient()
override;
67 clients::http::Client& GetHttpClient();
72 void OnConfigUpdate(
const dynamic_config::Snapshot& config);
74 void WriteStatistics(
utils::statistics::Writer& writer);
76 static std::vector<utils::NotNull<clients::http::Plugin*>>
77 FindPlugins(
const std::vector<std::string>& names,
const components::ComponentContext& context);
79 const bool disable_pool_stats_;
80 clients::http::Client http_client_;
81 concurrent::AsyncEventSubscriberScope subscriber_scope_;
82 utils::statistics::Entry statistics_holder_;
86inline constexpr bool kHasValidate<HttpClient> =
true;