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 {
19 public:
20 HttpTestpointClient(clients::http::Client& http_client,
21 const std::string& url,
22 std::chrono::milliseconds timeout);
23
24 ~HttpTestpointClient() override;
25
26 void Execute(std::string_view name, const formats::json::Value& json,
27 Callback callback) const override;
28
29 private:
30 clients::http::Client& http_client_;
31 const std::string url_;
32 const std::chrono::milliseconds timeout_;
33};
34
35} // namespace testsuite::impl
36
37USERVER_NAMESPACE_END