Module cowmachine

Cowmachine: webmachine middleware for Cowboy/Zotonic.

Copyright © 2016-2019 Marc Worrell

Behaviours: cowboy_middleware.

Authors: Marc Worrell (marc@worrell.nl).

Description

Cowmachine: webmachine middleware for Cowboy/Zotonic

Function Index

execute/2Cowboy middleware, route the new request.
log/1
log/2
request/2Handle a request, executes the cowmachine http states.

Function Details

execute/2

execute(Req, Env) -> {ok, Req, Env} | {stop, Req}

Cowboy middleware, route the new request. Continue with the cowmachine, requests a redirect or return a 400 on an unknown host.

log/1

log(Report) -> any()

log/2

log(Report, Req) -> any()

request/2

request(Context, Options::map()) -> {ok, Req, Env} | {stop, Req}

Handle a request, executes the cowmachine http states. Can be used by middleware functions to add some additional initialization of controllers or context.


Generated by EDoc