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