Class HttpFilterBase
Synopsis
#include <lib/inc/drogon/HttpFilter.h>
class DROGON_EXPORT HttpFilterBase : public virtual DrObjectBase
Description
The abstract base class for filters For more details on the class, see the wiki site (the 'Filter' section)
Inheritance
Ancestors: DrObjectBase
Decsendents: HttpFilter
Methods
~HttpFilterBase | ||
doFilter | This virtual function should be overrided in subclasses. |
Source
Lines 29-49 in lib/inc/drogon/HttpFilter.h.
class DROGON_EXPORT HttpFilterBase : public virtual DrObjectBase
{
public:
/// This virtual function should be overrided in subclasses.
/**
* This method is an asynchronous interface, user should return the result
* via 'FilterCallback' or 'FilterChainCallback'.
* @param req is the request object processed by the filter
* @param fcb if this is called, the response object is send to the client
* by the callback, and doFilter methods of next filters and the handler
* registed on the path are not called anymore.
* @param fccb if this callback is called, the next filter's doFilter method
* or the handler registered on the path is called.
*/
virtual void doFilter(const HttpRequestPtr &req,
FilterCallback &&fcb,
FilterChainCallback &&fccb) = 0;
virtual ~HttpFilterBase()
{
}
};