userver: userver/testsuite/http_testpoint_client.hpp Source File
Loading...
Searching...
No Matches
http_testpoint_client.hpp
1#pragma once
2
3#include <chrono>
4#include <functional>
5#include <string>
6
7#include <userver/formats/json_fwd.hpp>
8#include <userver/testsuite/testpoint_control.hpp>
9
10USERVER_NAMESPACE_BEGIN
11
12namespace clients::http {
13class Client;
14} // namespace clients::http
15
16namespace testsuite::impl {
17
18class HttpTestpointClient final : public TestpointClientBase {
19public:
20 HttpTestpointClient(clients::http::Client& http_client, const std::string& url, std::chrono::milliseconds timeout);
21
22 ~HttpTestpointClient() override;
23
24 void Execute(std::string_view name, const formats::json::Value& json, Callback callback) const override;
25
26private:
27 clients::http::Client& http_client_;
28 const std::string url_;
29 const std::chrono::milliseconds timeout_;
30};
31
32} // namespace testsuite::impl
33
34USERVER_NAMESPACE_END