10#include <userver/utils/not_null.hpp>
12USERVER_NAMESPACE_BEGIN
18namespace clients::http {
25class PluginRequest
final {
28 explicit PluginRequest(RequestState& state);
31 void SetHeader(std::string_view name, std::string_view value);
33 void AddQueryParams(std::string_view params);
35 void SetTimeout(std::chrono::milliseconds ms);
44 explicit Plugin(std::string name);
46 virtual ~Plugin() =
default;
68 const std::string name_;
73class PluginPipeline
final {
75 PluginPipeline(
const std::vector<utils::NotNull<Plugin*>>& plugins);
77 void HookPerformRequest(RequestState& request);
79 void HookCreateSpan(RequestState& request,
tracing::Span& span);
81 void HookOnCompleted(RequestState& request, Response& response);
84 const std::vector<utils::NotNull<Plugin*>> plugins_;