userver: samples/hello_service/src/hello_handler.hpp
Loading...
Searching...
No Matches
samples/hello_service/src/hello_handler.hpp
#pragma once
// Note: this is for the purposes of tests/samples only
namespace samples::hello {
class HelloHandler final : public server::handlers::HttpHandlerBase {
public:
// `kName` is used as the component name in static config
static constexpr std::string_view kName = "handler-hello-sample";
// Component is valid after construction and is able to accept requests
using HttpHandlerBase::HttpHandlerBase;
std::string HandleRequestThrow(const server::http::HttpRequest& request, server::request::RequestContext&)
const override;
};
} // namespace samples::hello