![]() |
TrinityCore
|
#include <HttpService.h>
Inheritance diagram for Trinity::Net::Http::DispatcherService:Public Member Functions | |
| DispatcherService (std::string_view loggerSuffix) | |
| RequestHandlerResult | HandleRequest (std::shared_ptr< AbstractSocket > session, RequestContext &context) |
Static Public Member Functions | |
| static RequestHandlerResult | HandleBadRequest (std::shared_ptr< AbstractSocket > session, RequestContext &context) |
| static RequestHandlerResult | HandleUnauthorized (std::shared_ptr< AbstractSocket > session, RequestContext &context) |
| static RequestHandlerResult | HandlePathNotFound (std::shared_ptr< AbstractSocket > session, RequestContext &context) |
Protected Member Functions | |
| void | RegisterHandler (boost::beast::http::verb method, std::string_view path, std::function< RequestHandlerResult(std::shared_ptr< AbstractSocket > session, RequestContext &context)> handler, RequestHandlerFlag flags=RequestHandlerFlag::None) |
Private Types | |
| using | HttpMethodHandlerMap = std::map< std::string, RequestHandler, std::less<> > |
Private Attributes | |
| HttpMethodHandlerMap | _getHandlers |
| HttpMethodHandlerMap | _postHandlers |
| std::string | _logger |
Definition at line 54 of file HttpService.h.
|
private |
Definition at line 74 of file HttpService.h.
|
inlineexplicit |
Definition at line 57 of file HttpService.h.
|
static |
Definition at line 85 of file HttpService.cpp.
References Trinity::Net::Http::Handled, and Trinity::Net::Http::RequestContext::response.
|
static |
Definition at line 97 of file HttpService.cpp.
References Trinity::Net::Http::Handled, and Trinity::Net::Http::RequestContext::response.
| RequestHandlerResult Trinity::Net::Http::DispatcherService::HandleRequest | ( | std::shared_ptr< AbstractSocket > | session, |
| RequestContext & | context | ||
| ) |
Definition at line 39 of file HttpService.cpp.
References _getHandlers, _logger, _postHandlers, Trinity::Net::Http::RequestContext::handler, Trinity::Net::Http::RequestContext::request, TC_LOG_DEBUG, and Trinity::Net::Http::ToStdStringView().
|
static |
Definition at line 91 of file HttpService.cpp.
References Trinity::Net::Http::Handled, and Trinity::Net::Http::RequestContext::response.
Referenced by Battlenet::LoginRESTService::HandleGetGameAccounts().
|
protected |
Definition at line 103 of file HttpService.cpp.
References _getHandlers, _logger, _postHandlers, ABORT_MSG, flags, STRING_VIEW_FMT, STRING_VIEW_FMT_ARG, TC_LOG_INFO, and Trinity::Net::Http::ToStdStringView().
Referenced by Trinity::Net::Http::HttpService< SessionImpl >::RegisterHandler().
|
private |
Definition at line 76 of file HttpService.h.
Referenced by HandleRequest(), and RegisterHandler().
|
private |
Definition at line 79 of file HttpService.h.
Referenced by HandleRequest(), and RegisterHandler().
|
private |
Definition at line 77 of file HttpService.h.
Referenced by HandleRequest(), and RegisterHandler().