userver
C++ Async Framework
Loading...
Searching...
No Matches
client.hpp
Go to the documentation of this file.
1
#
pragma
once
2
3
/// @file userver/clients/http/client.hpp
4
/// @brief @copybrief clients::http::Client
5
6
#
ifdef
USERVER_TVM2_HTTP_CLIENT
7
#
error
Use
clients
::
Http
from
clients
/
http
.
hpp
instead
8
#
endif
9
10
#
include
<
userver
/
clients
/
http
/
request
.
hpp
>
11
12
USERVER_NAMESPACE_BEGIN
13
14
namespace
clients::http {
15
16
/// @ingroup userver_clients
17
///
18
/// @brief HTTP client interface that returns a HTTP request builder from
19
/// CreateRequest().
20
///
21
/// Usually retrieved from @ref components::HttpClient component.
22
/// You can also create a client manually using @ref clients::http::CreateStandaloneHttpClient()
23
///
24
/// ## Example usage:
25
///
26
/// @snippet clients/http/client_test.cpp Sample HTTP Client usage
27
class
Client
{
28
public
:
29
Client() =
default
;
30
31
Client(
const
Client
&) =
delete
;
32
Client(
Client
&&) =
delete
;
33
Client
& operator=(
const
Client
&) =
delete
;
34
Client
& operator=(
Client
&&) =
delete
;
35
36
virtual
~Client();
37
38
/// @brief Returns a HTTP request builder type with some preset values.
39
///
40
/// @note This method is thread-safe despite being non-const.
41
virtual
Request
CreateRequest
() = 0;
42
43
/// @brief Providing CreateNonSignedRequest() function for the clients::Http alias.
44
///
45
/// @note This method is thread-safe despite being non-const.
46
Request
CreateNotSignedRequest
() {
return
CreateRequest
(
)
; }
47
};
48
49
}
// namespace clients::http
50
51
USERVER_NAMESPACE_END
userver
clients
http
client.hpp
Generated on Fri Dec 5 2025 12:18:19 for userver by
Doxygen
1.13.2