View Source cowmachine (cowmachine v1.12.0)
Link to this section Summary
Functions
Handle a request, executes the cowmachine http states. Can be used by middleware functions to add some additional initialization of controllers or context.
Link to this section Types
-type cmstate() ::
#cmstate{controller :: atom(),
is_process_called :: boolean(),
cache :: map(),
options :: map()}.
Link to this section Functions
-spec log(Report) -> Result when Report :: map(), Result :: any().
-spec log(Report, Req) -> Result when Report :: map(), Req :: map(), Result :: any().
-spec request(Context, Options) -> Result when Context :: cowmachine_req:context(), Options :: map(), Req :: cowboy_req:req(), Env :: cowboy_middleware:env(), Result :: {ok, Req, Env} | {stop, Req}.