userver
C++ Async Framework
Loading...
Searching...
No Matches
inspect_requests.hpp
Go to the documentation of this file.
1
#
pragma
once
2
3
/// @file userver/server/handlers/inspect_requests.hpp
4
/// @brief @copybrief server::handlers::InspectRequests
5
6
#
include
<
userver
/
server
/
handlers
/
http_handler_json_base
.
hpp
>
7
8
USERVER_NAMESPACE_BEGIN
9
10
namespace
server {
11
12
class
RequestsView;
13
14
namespace
handlers {
15
// clang-format off
16
17
/// @ingroup userver_components userver_http_handlers
18
///
19
/// @brief Handler that returns information about all in-flight requests.
20
///
21
/// The component has no service configuration except the
22
/// @ref userver_http_handlers "common handler options".
23
///
24
/// ## Static configuration example:
25
///
26
/// @snippet components/common_server_component_list_test.cpp Sample handler inspect requests component config
27
///
28
/// ## Scheme
29
/// Provide an optional query parameter `body` to get the bodies of all the
30
/// in-flight requests.
31
32
// clang-format on
33
class
InspectRequests
final
:
public
HttpHandlerJsonBase
{
34
public
:
35
InspectRequests(
const
components
::ComponentConfig& config,
const
components
::ComponentContext& component_context);
36
37
/// @ingroup userver_component_names
38
/// @brief The default name of server::handlers::InspectRequests
39
static
constexpr
std::string_view
kName
=
"handler-inspect-requests"
;
40
41
formats
::
json
::
Value
HandleRequestJsonThrow(
42
const
http
::HttpRequest& request,
43
const
formats
::
json
::
Value
& request_json,
44
request
::RequestContext& context
45
)
const
override
;
46
47
static
yaml_config
::Schema GetStaticConfigSchema();
48
49
private
:
50
RequestsView& view_;
51
};
52
53
}
// namespace handlers
54
}
// namespace server
55
56
template
<>
57
constexpr
inline
bool
components
::kHasValidate<server::handlers::InspectRequests> =
true
;
58
59
USERVER_NAMESPACE_END
userver
server
handlers
inspect_requests.hpp
Generated on Tue Nov 11 2025 16:12:31 for userver by
Doxygen
1.13.2