Function registerPreHandlingAdvice

Summary

#include <lib/inc/drogon/HttpAppFramework.h>

(1) virtual HttpAppFramework & registerPreHandlingAdvice(const std::function< void(const HttpRequestPtr &, AdviceCallback &&, AdviceChainCallback &&)> &advice)=0

(2) virtual HttpAppFramework & registerPreHandlingAdvice(const std::function< void(const HttpRequestPtr &)> &advice)=0

Function overload

Synopsis

#include <lib/inc/drogon/HttpAppFramework.h>

virtual HttpAppFramework & registerPreHandlingAdvice(const std::function< void(const HttpRequestPtr &, AdviceCallback &&, AdviceChainCallback &&)> &advice)=0

Description

Register an advice called before the request is handled.

Parameters

advice - is called immediately after the request is approved by all filters and before it is handled. The parameters of the advice are same as those of the doFilter method of the Filter class.

Source

Line 320 in lib/inc/drogon/HttpAppFramework.h.

Synopsis

#include <lib/inc/drogon/HttpAppFramework.h>

virtual HttpAppFramework & registerPreHandlingAdvice(const std::function< void(const HttpRequestPtr &)> &advice)=0

Description

Register an observer called before the request is handled.

Parameters

advice - is called at the same time as the above advice. It can be thought of as an observer who cannot respond to http requests. This advice has less overhead than the above one. If one does not intend to intercept the http request, please use this interface.

Source

Line 332 in lib/inc/drogon/HttpAppFramework.h.






Add Discussion as Guest

Log in