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

The abstract base class for filters For more details on the class, see the wiki site (the 'Filter' section). More...

#include <drogon/HttpFilter.h>

Inheritance diagram for drogon::HttpFilterBase:
Collaboration diagram for drogon::HttpFilterBase:

Public Member Functions

virtual void doFilter (const HttpRequestPtr &req, FilterCallback &&fcb, FilterChainCallback &&fccb)=0
 This virtual function should be overridden in subclasses.
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 filters For more details on the class, see the wiki site (the 'Filter' section).

Member Function Documentation

◆ doFilter()

virtual void drogon::HttpFilterBase::doFilter ( const HttpRequestPtr & req,
FilterCallback && fcb,
FilterChainCallback && fccb )
pure virtual

This virtual function should be overridden in subclasses.

This method is an asynchronous interface, user should return the result via 'FilterCallback' or 'FilterChainCallback'.

Parameters
reqis the request object processed by the filter
fcbif this is called, the response object is send to the client by the callback, and doFilter methods of next filters and the handler registered on the path are not called anymore.
fccbif this callback is called, the next filter's doFilter method or the handler registered on the path is called.

Implemented in drogon::IntranetIpFilter, and drogon::LocalHostFilter.


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