drogon
C++14/17-based HTTP application framework
Loading...
Searching...
No Matches
drogon::HttpSimpleControllerBase Class Referenceabstract

The abstract base class for HTTP simple controllers. More...

#include <drogon/HttpSimpleController.h>

Inheritance diagram for drogon::HttpSimpleControllerBase:
Collaboration diagram for drogon::HttpSimpleControllerBase:

Public Member Functions

virtual void asyncHandleHttpRequest (const HttpRequestPtr &req, std::function< void(const HttpResponsePtr &)> &&callback)=0
 The function is called when a HTTP request is routed to the controller.
Public Member Functions inherited from drogon::DrObjectBase
virtual const std::string & className () const
 Get the class name.
virtual bool isClass (const std::string &class_name) const
 Return true if the class name is 'class_name'.

Detailed Description

The abstract base class for HTTP simple controllers.

Member Function Documentation

◆ asyncHandleHttpRequest()

virtual void drogon::HttpSimpleControllerBase::asyncHandleHttpRequest ( const HttpRequestPtr & req,
std::function< void(const HttpResponsePtr &)> && callback )
pure virtual

The function is called when a HTTP request is routed to the controller.

Parameters
reqThe HTTP request.
callbackThe callback via which a response is returned.

The documentation for this class was generated from the following file: