Function registerHttpResponseCreationAdvice

Synopsis

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

virtual HttpAppFramework & registerHttpResponseCreationAdvice(const std::function< void(const HttpResponsePtr &)> &advice)=0

Description

Register an advice for new HTTP responses.

Parameters:

advice - is called immediately when a new HTTP response is created. Users can use the callback to modify the response if they want.

Note
This advice is called before any subsequent operation on the response is performed by drogon or applications, so some modification (e.g. modification on the status code) in this callback may be overrided by subsequent operations.
Return
HttpAppFramework&

Mentioned in

Source

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






Add Discussion as Guest

Log in to DocsForge